I have set my Class Path and Path as follows PATH=$PATH:$HOME/bin:/d02/interface/ap/payment:/d02/interface/ap/payment/saxon.exe:/d01/oracle/devcomn/util/java/1.4/j2sdk1.4.2_04/bin:.:/d01/oracle/devcomn/util/java/1.4/j2sdk1.4.2_04/jre/lib:/d02/interface/ap/payment/saxon
I have mentioned the directory where the java is installed in the Path and the rt.jar file in the Class Path but still when I try to run the java command java test it gives me an error Exception in thread main No Class Def Found error. Please help
posted 8 years ago
export PATH is to execute java,javac etc at any location. This more to your OS.
export CLASSPATH is to set your classes and dependent classes in your the classpath for java to load
when you are executing "java test" you need to specify where your test class resides.
for eg: "export CLASSPATH=/home" assuming the test.class is in /home folder and has no package structure