Good day, I have two classes, Map and Field, in the same directory. I successfully compiled Field.java but when i compile Map.java, i get this:
Map.java:4: e
Almost without question, the problem is that you have the CLASSPATH environment variable set, and your value does not include ".", the current directory. There are two different simple fixes for this problem: one would be to remove the environment variable, but that might break an installation of some third-party software that is depending on it. The second way to fix this is just to use the –classpath argument as part of your compile line:
javac -classpath . Map.java