title: java packages: cannot find symbol (2)
body: <p>my question is almost the same as this one : <a href="https://stackoverflow.com/questions/11527941/java-packages-cannot-find-symbol">java packages: cannot find symbol</a></p>
  
  <p>Suppose you have two classes A and B, declared respectively in the files A.java and B.java, with B used in the class A. Then the command line "javac A.java" will work perfectly. But somehow if you add both A and B in the same package (adding the line : "package toto;" at the begining of each file), then "javac A.java" will give the error that the symbol "B" cannnot be found.</p>
  
  <p>The solution given above (<a href="https://stackoverflow.com/questions/11527941/java-packages-cannot-find-symbol">java packages: cannot find symbol</a>) was to call the compilation line : "javac A.java B.java" and this works. I would like to know if there is a solution to make it work, but compiling the java files one at a time. (I use java 7).</p>
  
  <p>Thanks in advance</p>