Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439

java Hello
Exception in thread "main" java.lang.NoClassDefFoundError: Hello

In case of doubt ...

java -version

echo $CLASSPATH

should contain the '.' directory

java -classpath . Hello

After 'java', the only thing that should appear is the name of a 'public' class with a 'main' method in it ...

How to set your classpath in your .tcshrc file :

setenv CLASSPATH .:/Library/Java/Extensions/JSDT/lib/jsdt.jar
or
setenv CLASSPATH "$CLASSPATH":.

TSG Info :

Java 1.4.2 is the default on the Linux lab machines now. /usr/local/java/bin is in the path of anyone using tcsh as their shell, so students should be able to use Java straight away.
Java 1.3.1 is still the default on the Solaris machines, but 1.4.2 will be the default by this evening (!).