Hai Friends, I have my java files in a MyJava folder. i set the path by c:\MyJava>path=.;c:/program files/java/jdk1.5.0/bin/ I can able to compile and run single-stand alone java files in MyJava folder. But whenever i am trying to compile a java files which is also in MyJava folder but which uses/(has code) other java class files in the same folder i am getting compile error - means it can't able to refer the other java class files,which are also in the same MyJava folder.Plz help me. Thank You!
Have a nice day
Nicolas Stern
Ranch Hand
Joined: Apr 26, 2002
Posts: 57
posted
0
Hi,
You must also set the Classpath to the folder in which your classes are stored.
HTH - Cheers - Nic
Jeff Albertson
Ranch Hand
Joined: Sep 16, 2005
Posts: 1780
posted
0
If you don't set the CLASSPATH environment variable, you can always supply a classpath on the command line for javac and java:
I know you are just starting in Java, but if you understand a little about XML, using Ant as a build tool will be a big help. Eventually most people end up using IDEs, but its still good to be able to use Ant.
There is no emoticon for what I am feeling!
pravinth Ganesan
Greenhorn
Joined: Oct 23, 2005
Posts: 13
posted
0
Thank You Friends. Now its working after setting the classpath. Thank You guys. Thanks for your help!
Note:I am not new to java! i forgot about this classpath. [ February 17, 2006: Message edited by: pravinth Ganesan ]