title: Java Application in JFrame gets stuck after StartMenu
body: <p>I have made a game with 20+ classes in it and if I run the application in Eclipse it perfectly works. </p>
  
  <p>Now if I export the game to a runnable jar, it gets stuck when I try to launch the game. But the weird thing is that my intro plays and I can continue by pressing "enter" to my menu, but if I try to start the game from there, the menu gets stuck. (normally the background of my menu moves)</p>
  
  <p>So, I have three <code>GameState</code> wich are called <code>introState</code>, <code>menuState</code> and <code>level1State</code>. These three all extend from GameState. introState and menuState work perfectly but level1State doesn't. </p>
  
  <p>I'll put the code from level1State and the manifestfile here. Eclipse doesn't give me any errors.</p>
  
  <p>My game does have a Main-class and every class displayed does exist and works.</p>
  
  <p>Any ideas on what causes this and how to solve this? Or maybe another way to play this game outside eclipse?</p>
  
  <p>package GameState;</p>
  
  <pre><code>import Main.GamePanel;
  import TileMap.*;
  import Entity.*;
  import Entity.Enemies.*;
  import java.awt.*;
  import java.awt.event.KeyEvent;
  import java.util.ArrayList;
  
  package GameState;
  
  import Main.GamePanel;
  import TileMap.*;
  import Entity.*;
  import Entity.Enemies.*;
  import java.awt.*;
  import java.awt.event.KeyEvent;
  import java.util.ArrayList;
  
  public class Level1State extends GameState {
  
      private TileMap tileMap;
      private Background bg;
  
      private Player player;
  
      private ArrayList&lt;Enemy&gt; enemies;
  
      private HUD hud;
  
      public Level1State(GameStateManager gsm) {
          this.gsm = gsm;
          init();
      }
  
      public void init() {
  
          tileMap = new TileMap(30);
          tileMap.loadTiles("/Tilesets/darktheme.gif");
          tileMap.loadMap("/Maps/level1-1.map");
          tileMap.setPosition(0, 0);
          tileMap.setTween(1);
  
          bg = new Background("/Backgrounds/backgroundbg.gif", 0.1);
  
          player = new Player(tileMap);
          player.setPosition(100, 100);
  
          populateEnemies();
  
          hud = new HUD(player);
  
      }
  
      private void populateEnemies() {
  
          enemies = new ArrayList&lt;Enemy&gt;();
  
  
          Slugger s;
          Point[] points = new Point[] {
              new Point(860, 200),
              new Point(1525, 200),
              new Point(1680, 200),
              new Point(1800, 200)
          };
          for(int i = 0; i &lt; points.length; i++) {
              s = new Slugger(tileMap);
              s.setPosition(points[i].x, points[i].y);
              enemies.add(s);
          }
  
  
  
          Spin s1;
          Point[] point = new Point[]{
                  new Point(1990,100)
          };
          for(int k = 0; k &lt; point.length; k ++){
              s1 = new Spin(tileMap);
              s1.setPosition(point[k].x, point[k].y);
              enemies.add(s1);
              //System.out.println(point[k].y);
          }
  
  
      }
  
      public void update() {
  
          // update player
          player.update();
          tileMap.setPosition(
              GamePanel.WIDTH / 2 - player.getx(),
              GamePanel.HEIGHT / 2 - player.gety()
          );
  
          // set background
          bg.setPosition(tileMap.getx(), tileMap.gety());
  
          // attack enemies
          player.checkAttack(enemies);
  
          // update all enemies
          for(int i = 0; i &lt; enemies.size(); i++) {
              Enemy e = enemies.get(i);
              e.update();
              if(e.isDead()) {
                  enemies.remove(i);
                  i--;
              }
          }
  
      }
  
      public void draw(Graphics2D g) {
  
          // draw bg
          bg.draw(g);
  
          // draw tilemap
          tileMap.draw(g);
  
          // draw player
          player.draw(g);
  
          // draw enemies
          for(int i = 0; i &lt; enemies.size(); i++) {
              enemies.get(i).draw(g);
          }
  
          // draw hud
          hud.draw(g);
  
      }
  
      public void keyPressed(int k) {
          if(k == KeyEvent.VK_LEFT) player.setLeft(true);
          if(k == KeyEvent.VK_RIGHT) player.setRight(true);
          if(k == KeyEvent.VK_UP) player.setUp(true);
          if(k == KeyEvent.VK_DOWN) player.setDown(true);
          if(k == KeyEvent.VK_SPACE) player.setJumping(true);
          if(k == KeyEvent.VK_E) player.setGliding(true);
          if(k == KeyEvent.VK_A) player.setScratching();
          if(k == KeyEvent.VK_F) player.setFiring();
      }
  
      public void keyReleased(int k) {
          if(k == KeyEvent.VK_LEFT) player.setLeft(false);
          if(k == KeyEvent.VK_RIGHT) player.setRight(false);
          if(k == KeyEvent.VK_UP) player.setUp(false);
          if(k == KeyEvent.VK_DOWN) player.setDown(false);
          if(k == KeyEvent.VK_SPACE) player.setJumping(false);
          if(k == KeyEvent.VK_E) player.setGliding(false);
      }
  }
  </code></pre>
  
  <p>Manifest file: </p>
  
  <pre><code>Manifest-Version: 1.0
  Rsrc-Class-Path: ./
  Class-Path: .
  Rsrc-Main-Class: Main.Game
  Main-Class: org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader
  </code></pre>