Reputation: 127
Basically, my program compiles and runs fine in Eclipse but doesn't compile in Command Prompt. It gives me Symbol Not Found with the pointer on the name of one of my classes. I've never had this happen before- the only difference between this program and the other ones I wrote is that I made a package in Eclipse for them. Any ideas?
Upvotes: 1
Views: 3102
Reputation: 11
If you did not do it already, it might help if you remove the package declaration in the java files. If your compiling class uses any other classes, they will not be compiled because of the package declaration. It happened with me once.
Upvotes: 0
Reputation: 786
I think you didn't set the path correctly.
The path is required to be set for using tools such as javac, java etc.
If you are saving the java source file inside the jdk/bin directory, path is not required to be set because all the tools will be available in the current directory.
But If you are having your java file outside the jdk/bin folder, it is necessary to set path of JDK.
Upvotes: 2