title: a JNI error has occurred, please check your installation and try again and A java exception has ocurred error after exporting the program in eclipse
body: <p>After exporting the program, when I try to run the JAR file, the error occurs:
  a JNI error occurred, check your installation and try again followed by a java exception occurred.
  I have no idea how to solve this, I don't know if it's something about the code or the Java version
  I'll post the code here (the main code) so please help!</p>
  <p>My java is: 8 281 as JDK</p>
  <pre><code>import java.awt.Color;
  import java.awt.Dimension;
  import java.awt.Graphics;
  import java.awt.event.KeyEvent;
  import java.awt.event.KeyListener;
  import java.awt.image.BufferStrategy;
  import java.awt.image.BufferedImage;
  
  import javax.swing.JFrame;
  
  public class Game extends Canvas implements Runnable, KeyListener{
  
      /**
       * 
       */
      private static final long serialVersionUID = 1L;
      public static int WIDTH = 160;
      public static int HEIGHT = 120;
      public static int SCALE = 3;
      
      public BufferedImage layer = new BufferedImage(WIDTH,HEIGHT,BufferedImage.TYPE_INT_RGB);
      
      public static Enemy enemy;
      public static Player player;
      public static Ball ball;
      
      public Game() {
          
          this.setPreferredSize(new Dimension(WIDTH*SCALE,HEIGHT*SCALE));
          this.addKeyListener(this);
          player = new Player(60, HEIGHT-5);
          enemy = new Enemy(60, 0);
          ball = new Ball(60, HEIGHT/2 - 1);
      }
      
      public static void main(String[] args) {
          
          Game game = new Game();
          JFrame frame = new JFrame(&quot;Pong by Skubs&quot;);
          frame.setResizable(false);
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.add(game);
          frame.pack();
          frame.setLocationRelativeTo(null);
          frame.setVisible(true);
          
          new Thread(game).start();
      }
      
      public void tick() {
          player.tick();
          enemy.tick();
          ball.tick();
      }
      
      public void render() {
          BufferStrategy bs = this.getBufferStrategy();
          if(bs == null) {
              this.createBufferStrategy(3);
              return;
          }
          
          Graphics g = layer.getGraphics();
          g.setColor(Color.black);
          g.fillRect(0, 0 , WIDTH, HEIGHT);
          
          g.setColor(Color.white);
          g.fillRect(0, 60 , WIDTH, HEIGHT/120);
      
          
          player.render(g);
          enemy.render(g);
          ball.render(g);
          
          g = bs.getDrawGraphics();
          g.drawImage(layer, 0, 0, WIDTH*SCALE, HEIGHT*SCALE, null);
          
          bs.show();
      }
      
      @Override
      public void run() {
          requestFocus();
          while(true) {
              tick();
              render();
              try {
                  Thread.sleep(1000/60);
              } catch (InterruptedException e) {
                  e.printStackTrace();
              }
          }
          
          
      }
          
      
  
    
      
      @Override
      public void keyPressed(KeyEvent e) {
          if(e.getKeyCode() == KeyEvent.VK_RIGHT) {
                player.right = true;  
                
          }else if(e.getKeyCode() == KeyEvent.VK_LEFT) {
              player.left = true;
          }
          
      }
  
      @Override
      public void keyReleased(KeyEvent e) {
          if(e.getKeyCode() == KeyEvent.VK_RIGHT) {
                player.right = false; 
                
          }else if(e.getKeyCode() == KeyEvent.VK_LEFT) {
              player.left = false;
          }
      }
  
      @Override
      public void keyTyped(KeyEvent e) {
          // TODO Auto-generated method stub
          
      }
  
  }
  
      enter code here
  </code></pre>