My programs compile fine until I try to compile a java file that calls another class. Then I get an error that says cannot resolve symbol for the my class declaration. I have all my files in the same folder and the .class file is there. I have uninstalled and reinstalled jdk 1.4 multiple times along with textpad but the problem is still there. I am lost so if anyone has any ideas please let me know.
Thanks
Compiles fine but can't locate the .class files
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Re: Compiles fine but can't locate the .class files
the exact thing happend to me, just do the following:
click start-> run-> type msconfig ->go to the environment tab
if the CLASSPATH or/and JAVA_HOME variables are there, delete them, or uncheck them.
if you don't want to delete them, you can put all your files in the folder that it specifies, but I really recomend deleting them, it makes no harm to your computer
this is for Windows Me, but the process is similar on other windows. Also I think you can do it editing AUTOEXEC.BAT
click start-> run-> type msconfig ->go to the environment tab
if the CLASSPATH or/and JAVA_HOME variables are there, delete them, or uncheck them.
if you don't want to delete them, you can put all your files in the folder that it specifies, but I really recomend deleting them, it makes no harm to your computer
this is for Windows Me, but the process is similar on other windows. Also I think you can do it editing AUTOEXEC.BAT
Re: Compiles fine but can't locate the .class files
You really don't want to delete the classpath environment variable, it's pretty useful if you're using classes in different directories. All you need to do is find the classpath variable, and put .; at the start of it. Then java will look in the current directory for other class files before resorting to the other ones listed.