title: File location for fileinputstream
body: <p>I'm doing an Android project and I have a .bin format file which I put it right at the root of my Java project (not in any folder). I tried to retrieve it using FileInputStream such as below:</p>
  
  <pre><code>InputStream file = new FileInputStream("filename.bin");
  </code></pre>
  
  <p>But it couldn't read the file.</p>
  
  <p>Where should I put my bin file? or is there something else that I need to take note of?</p>
  
  <p>[Edit]The error:</p>
  
  <pre><code>Error occurred during initialization of VM
  java/lang/NoClassDefFoundError: java/lang/ref/FinalReference
  </code></pre>
  
  <p>[Edit] Solution:
  Found the solution from here >> <a href="https://stackoverflow.com/questions/9455236/eclipse-error-noclassdeffounderror-java-lang-ref-finalreference">Eclipse error: NoClassDefFoundError: java/lang/ref/FinalReference</a>. </p>
  
  <pre><code>1. Find Running configurations -&gt; java application
  2. In the new configuration's Classpath tab, find "Android Library" under Bootstrap Entries and remove it.
  3. Still in the Classpath tab, select Bootstrap Entries and click the Advanced button.
  4. Choose Add Library and click OK.
  5. Select JRE System Library and click Next.
  6. Select Workspace Default JRE and click Finish.
  </code></pre>