Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Do I have to set a CLASSPATH?

0 views
Skip to first unread message

Dirk-Jan

unread,
Aug 26, 2000, 9:24:28 PM8/26/00
to
When I run jar I get the following error:

$jar
java.lang.NoClassDefFoundError: sun/tools/jar/Main
at java.lang.Throwable.<init>(Throwable.java:40)
at java.lang.Error.<init>(Error.java:21)
at java.lang.LinkageError.<init>(LinkageError.java:21)
at
java.lang.NoClassDefFoundError.<init>(NoClassDefFoundError.java:21)

And when I run orion:

$java -jar orion.jar
java.lang.ExceptionInInitializerError: [exception was
java.lang.NoClassDefFoundError: java/util/HashMap]
at kaffe.jar.ExecJar.main(ExecJar.java:89)

Some info about my system configuration:
- Java 2 SDK 1.3.0 Beta installed from the
j2sdk-1_3_0-beta_refresh-linux.rpm package.
- /lib/libc-2.1.1.so
- /usr/i386-glibc20-linux

Greetings,
Dirk-Jan

Ben Z. Tels

unread,
Aug 27, 2000, 3:00:00 AM8/27/00
to
> $jar
> java.lang.NoClassDefFoundError: sun/tools/jar/Main
> at java.lang.Throwable.<init>(Throwable.java:40)
> at java.lang.Error.<init>(Error.java:21)
> at java.lang.LinkageError.<init>(LinkageError.java:21)
> at
> java.lang.NoClassDefFoundError.<init>(NoClassDefFoundError.java:21)

Do you have a symbolic link somewhere in your PATH to the jar executable? If
you do, that is the problem. All the JDK executables on UNIX systems are
symlinks to a large script (.java_wrapper, I think it's called), which has a
dependency on the working directory of the invoked executable. If you invoke
a symlink instead of the actual directory, the script looks in the wrong
place for the standard class libraries.

> And when I run orion:
>
> $java -jar orion.jar
> java.lang.ExceptionInInitializerError: [exception was
> java.lang.NoClassDefFoundError: java/util/HashMap]
> at kaffe.jar.ExecJar.main(ExecJar.java:89)
>
> Some info about my system configuration:
> - Java 2 SDK 1.3.0 Beta installed from the
> j2sdk-1_3_0-beta_refresh-linux.rpm package.

If you are running all of this on top of Sun's Java 2 SDK, why is the java
executable in the error message above looking for one of Kaffe's libraries?
I think you'd better check your path for stale VM programs.

> - /lib/libc-2.1.1.so
> - /usr/i386-glibc20-linux

Does that run? I thought Java 2 JDKs from Sun/Blackdown required glibc-2.1.2
minimum?


--
Ben Z. Tels
opti...@stack.nl
http://www.stack.nl/~optimusb/
UIN:2474460

"The Earth is the cradle of the mind, but one cannot stay in the cradle
forever."
--Tsiolkovsky

0 new messages