Got a new problem. I'm guessing it's basic but I'm at the point I need some help.
I'm currently writing new classes and compiling them successfully, when I try to reference the new class types in a main method (in a separate file but same directory) the main method cannot find my new classes and will not compile.
("cannot find symbol class: <classname>")
Both classes/files are in the same directory. Neither file belongs to any package.
My PATH environment variable seems to be OK, because the new classes compile OK, they just can't be used by other classes or files in the same directory.
Any ideas? (I'm imagining the answer may be quite embarassingly obvious!)
pete stein
Bartender
Joined: Feb 23, 2007
Posts: 1561
posted
0
And Green wrote:I'm currently writing new classes and compiling them successfully, when I try to reference the new class types in a main method (in a separate file but same directory) the main method cannot find my new classes and will not compile.
("cannot find symbol class: <classname>")
Both classes/files are in the same directory. Neither file belongs to any package.
Any ideas? (I'm imagining the answer may be quite embarassingly obvious!)
Have you tried fixing the package issue -- putting all your code in proper packages?
It may also help if you provided more details, such as... do you have a CLASSPATH set? How are you compiling it? And the exact output of the error messages.
Henry Wong wrote:
It may also help if you provided more details, such as... do you have a CLASSPATH set? How are you compiling it? And the exact output of the error messages.
Henry
It was the classpath! Many thanks Henry and sorry to trouble you (and anyone else) with this.