cmbhatt
Originally posted by Hardik Raja:
You mean to say, If I want to include some directory to be in the default classpath, I should add that directory path in PATH environment variable in Windows..? correct ?
Why does one create and set JAVA_HOME enviroment variable..??
Thanks
cmbhatt
Originally posted by Hardik Raja:
OK I got what you explained...
but If I am including some directory path
eg. c:\hardik (note hardik is a directory) in PATH environment variable
and hardik contains one package p1 which contains a class file animal
i.e p1.animal which I require in test.class
If I exceute using java test...it give the following runtime error..
Exception in thread "main" java.lang.NoClassDefFoundError: p1/animal
at p2.test.main(test.java:9)
and If I execute using overriding classpath say....
java -cp \hardik;. test
..It Executes perfectly..
Why is the default classpath not able to find animal class(p1.animal) ?
Thanks
SCJP<br />SCJD
The PATH and CLASSPATH variables are not the same.
Even though set it correctly, I can not compile my source with import....
the compiler can not recognize any .my jar files from where all jar are like c:\lib
My source is c:\int\source
I used the command like javc mysource.java in c:\int\source
how to fix it and what's problem is.
cmbhatt