title: .jar file not running without resource folder
body: <p>I followed a tutorial on YouTube on how to build a game in Java. I changed the code quiet a bit but kept all the basics. When I export my game with eclipse as a runnable jar the game only works when the resources folder is in the same directory as the jar. Otherwise I just get a blank screen even though the resource folder is in the build path and in the jar.   </p>
  
  <p>You can look at the full code here:  <a href="https://github.com/CodeNMore/New-Beginner-Java-Game-Programming-Src/tree/master/Episode%2034/TileGame" rel="nofollow noreferrer">https://github.com/CodeNMore/New-Beginner-Java-Game-Programming-Src/tree/master/Episode%2034/TileGame</a></p>
  
  <p>But I think the most important parts are these: </p>
  
  <pre><code>public class FontLoader {
  
  public static Font loadFont(String path, float size){
      try {
          return Font.createFont(Font.TRUETYPE_FONT, new File(path)).deriveFont(Font.PLAIN, size);
      } catch (FontFormatException | IOException e) {
          e.printStackTrace();
          System.exit(1);
      }
      return null;
  }
  }
  
  public class Utils {
  
  public static String loadFileAsString(String path){
      StringBuilder builder = new StringBuilder();
  
      try{
          BufferedReader br = new BufferedReader(new FileReader(path));
          String line;
          while((line = br.readLine()) != null)
              builder.append(line + "\n");
  
          br.close();
      }catch(IOException e){
          e.printStackTrace();
      }
  
      return builder.toString();
  }
  
  public static int parseInt(String number){
      try{
          return Integer.parseInt(number);
      }catch(NumberFormatException e){
          e.printStackTrace();
          return 0;
      }
      }
  
  }
  
  public class ImageLoader {
  
  public static BufferedImage loadImage(String path){
      try {
          return ImageIO.read(ImageLoader.class.getResource(path));
      } catch (IOException e) {
          e.printStackTrace();
          System.exit(1);
      }
      return null;
  }
  
  }
  </code></pre>
  
  <p>I didn't alter these in my version.</p>
  
  <p>My next guess would be that the Manifest file is the issue but I honestly don't know how I would have to alter it for the jar to run properly. 
  The automatically created one just contains this: </p>
  
  <pre><code>Manifest-Version: 1.0
  Class-Path: .
  Main-Class: main.Launcher
  </code></pre>