title: Java compiler is using old version of source code
body: <p>I am experiencing a very annoying problem to me, imagine I compile the file FooBar.java:</p>
  
  <blockquote>
    <p>$ javac FooBar.java</p>
  </blockquote>
  
  <p>It compiles sucefully and then I run it as usual:</p>
  
  <blockquote>
    <p>$ java FooBar &lt; in.txt</p>
  </blockquote>
  
  <p>I get the output as expected, the deal is, if I change the source code (FooBar.java) to print something else and compile it again I get the same output as the first time! </p>
  
  <p>This is really making me mad... is there any cache for the javac? Even if I delete FooBar.class and recompile I get the output from the early source code. The only way I found to solve this is to delete FooBar.java and create a new file with a diferent name (I just copy-pasted the code), this works.</p>
  
  <p>This bug (?) is really bugging me. I've searched for a solution or an explanation to why this happens but with no luck.</p>
  
  <p>This seems to be related to my problem but not completely as I am not using any IDE and the Classpath points to my working folder:
  <a href="http://www.coderanch.com/t/519372/java/java/Executing-Old-Code" rel="nofollow">http://www.coderanch.com/t/519372/java/java/Executing-Old-Code</a></p>
  
  <p>I would like to find out what's causing this as I don't want to make a new file everytime I update source code... I'm on Windows with Java 1.6.0_27 </p>
  
  <p>Thanks for reading...</p>