title: Can't find resource for bundle java.util.PropertyResourceBundle, sc.title
body: <p>I use Eclipse Oxygen.2 Release (4.7.2) and try to develop a pen &amp; paper character creation program as an exercise to learn to work with different files like xml and properties.</p>
  
  <p>My <em>ResBundle.properties</em>-file looks like this:</p>
  
  <pre><code>cc.male=male
  cc.female=female
  cc.askForGender=Choose a gender for your hero
  
  sc.btnStart=Start\n Creation
  sc.title=Creation of a Setting
  sc.creationProps=Creation Properties
  sc.creationPropsComment=Properties for character creation
  </code></pre>
  
  <p>It is a lot longer and has 60 lines of code similar to the shown part. My main JFrame uses the file like shown below:</p>
  
  <pre><code>JMenuItem mntmNewchar = new JMenuItem(lang.getString("gui.char.new"));
  </code></pre>
  
  <p>My second JFrame, which I use to create a new Character/World has the same code. For example: </p>
  
  <pre><code>setTitle(lang.getString("sc.title"));
  </code></pre>
  
  <p>Still I get the Exception:</p>
  
  <blockquote>
    <p>Can't find resource for bundle java.util.PropertyResourceBundle, key sc.title</p>
  </blockquote>
  
  <p>My main Method:</p>
  
  <pre><code>try {
      lang = ResourceBundle.getBundle("ResBundle", new Locale("en"));
  } catch(MissingResourceException e) {
      e.printStackTrace();
  }
  mainFrame = new MainFrame();
  mainFrame.setVisible(true);
  </code></pre>
  
  <p>The most answers I find to this question deal with the same Exception. But they only tell me how I have to move the properties file into my source foulder/class path folder. I had the Exception before and moved the file, so now it is in the folder <em>lib/lang</em> which I added to my build path as a source folder (with Eclipse). After that I coul'd continue programming until I got the Exception message described above. </p>
  
  <p>When I use just another key for testing, it works. I tried to rename the key in the properties file and in my program, but the Exception still occurs. </p>
  
  <p>The weirdest part is, that it already worked. I could open a second JFrame through a button and the same key!, that means </p>
  
  <blockquote>
    <p>"sc.title"</p>
  </blockquote>
  
  <p>and other keys I use in the second JFrame, didn't throw an Exception. Just after some adaptations of other swing components, I couldn't start my program anymore because of that Exception.</p>
  
  <p>I found this similar question:</p>
  
  <p><a href="https://stackoverflow.com/questions/41599435/java-util-missingresourceexception-cant-find-resource-for-bundle-java-util-pro">java.util.missingresourceexception: Can't find resource for bundle java.util.ResourceBundle, key</a></p>
  
  <p>I inserted a line break as a first line, but that changes nothing. Also I found a question which was asked 6 month ago, but still got no answer. Still it is the same problem as I am having:</p>
  
  <p><a href="https://stackoverflow.com/questions/46322325/java-resourcebundle-cant-find-resource-for-bundle-java-util-propertyresourceb">Java - ResourceBundle Can't find resource for bundle java.util.PropertyResourceBundle
  </a></p>
  
  <p>I hope someone can help me or describe, why the JVM cant find the key. I think I have the right structure of the properties-file and I don't know, why it's not working.</p>
  
  <p>Thank you very much for everyone who can help me a little or a lot. </p>
  
  <hr>
  
  <p>Edit (Answer @arthur):</p>
  
  <p>My current folder structure- root folder:</p>
  
  <p><a href="https://i.stack.imgur.com/o4YIs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o4YIs.png" alt="fodler tree"></a></p>
  
  <p>lib/lang/ResBundle.properties</p>
  
  <p>Eclipse shows me, that I included the folder as follows</p>
  
  <ul>
  <li>Eclipse properties for my java project. The tab "Java Build Path" ist shown</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/eOqXk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eOqXk.png" alt="Eclipse properties for my java project. The tab &quot;Java Build Path&quot; ist shown"></a></p>