[ILUG-BOM] Java doubt

Manish Jethani linuxers@mm.ilug-bom.org.in
Mon Jan 21 12:04:03 2002


Sometime yesterday, Nikhil Joshi wrote:

> $javac Example.java
> 
> it gives me following error
> 
> Exception in thread 
> "main" java.lang.NoClassDefFoundError: com/sun/tools/javac/Main

Your JDK is not installed properly.  The
com.sun.tools.javac.Main class needs to be in your classpath.
Check the javac script.  Check your $CLASSPATH variable.
Include dt.jar (I think) in your classpath or pass it on the
command line to javac OR unset your $CLASSPATH variable (default
will be used).

Check out the FAQs on Sun's java page.

Manish

PS:  This is my classpath, compare:
.:/usr/local/jdk1.2.2/lib:/usr/local/jdk1.2.2/include

-- 
Why do seagulls live near the sea?  'Cause if they lived near
the bay, they'd be called baygulls.