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

Running Java Applications

9 views
Skip to first unread message

Rob Ristroph

unread,
Jul 25, 2001, 2:56:47 AM7/25/01
to

I am running RedHat 7.1. I have the Sun jave run time environment
installed as well as kaffe.

I can't seem to run Java programs. The two I most recently tried are
LimeWire and Phex (gnutella clients). Whether I use the sun java
command or kaffe, I get an error like this:

[LimeWire] cs666818-93| java -classpath . RunLime
Couldn't find or load essential class `java/lang/Object' java.lang.NoClassDefFoundError java/lang/Object
zsh: 15281 abort java -classpath . RunLime
[LimeWire] cs666818-93|

I searched my system for other directories to add to the classpath (I
used the correct colon syntax). The main ones seem to be
/usr/java/jre1.3.1/lib and /usr/share/kaffe, but I also tried it with
every directory that contained a .jar file on my system, even the
mozilla and netscape ones. It still gave the same error.

Here's the same thing trying to run Phex:

Phex] cs666818-93| java -classpath .:/usr/java/jre1.3.1/lib -jar phex.jar
Couldn't find or load essential class `java/lang/Object' java.lang.NoClassDefFoundError java/lang/Object
zsh: 15291 abort java -classpath .:/usr/java/jre1.3.1/lib -jar phex.jar
[Phex] cs666818-93|

Does anyone out there know what I am lacking ? I suspect it is
something simple like an environment variable.

A few more general questions:

1) is it correct to make an analogy between .so and .jar files, and
between $LD_LIBRARY_PATHS and $CLASSPATH ?

2) if so, what is the analogous command to the utilities ldd and nm ?

Thanks in advance !

--Rob

dbia...@square.nl

unread,
Jul 25, 2001, 3:17:58 AM7/25/01
to
Rob Ristroph <rgris...@yahoo.com> wrote:
> Phex] cs666818-93| java -classpath .:/usr/java/jre1.3.1/lib -jar phex.jar

Note: if you use "java -jar" the classpath is ignored. The Jar file should
have the classpath in the internal manifest file.

If you are using jre 1.3 or newer, the Classpath is not necessary.

A lot of people complained against RH 7.x and Java, usually adding the
environment variable LD_ASSUME_KERNEL=2.2.5 to your shell the problem
is solved.

Davide

Rob Ristroph

unread,
Jul 25, 2001, 11:58:13 AM7/25/01
to

>>>>> "dbianchi" == dbianchi <dbia...@square.nl> writes:
dbianchi>
dbianchi> Rob Ristroph <rgris...@yahoo.com> wrote:
>> Phex] cs666818-93| java -classpath .:/usr/java/jre1.3.1/lib -jar
>> phex.jar
dbianchi>
dbianchi> Note: if you use "java -jar" the classpath is ignored. The
dbianchi> Jar file should have the classpath in the internal manifest
dbianchi> file.
dbianchi>
dbianchi> If you are using jre 1.3 or newer, the Classpath is not
dbianchi> necessary.
dbianchi>
dbianchi> A lot of people complained against RH 7.x and Java, usually
dbianchi> adding the environment variable LD_ASSUME_KERNEL=2.2.5 to
dbianchi> your shell the problem is solved.
dbianchi>
dbianchi> Davide
dbianchi>

I tried "export LD_ASSUME_KERNEL=2.2.5" and repeated my various
attempts to run the java programs with no success. The error messages
were the same.

I've been doing a bit of searching on groups.google.com and it seems
that LD_ASSUME_KERNEL stuff might apply to Sun's jdk 1.3.0 but might
be fixed in 1.3.1, which is what I have. In anycase, it probably
shouldn't stop me from using kaffe, the java environment from RedHat,
right ?

I just looked through about 30 pages of returns on the
groups.google.com search "RedHat 7.1 Java" and I'm not seeing my
problem - the only person who had something that might be similar was
advised to switch to debian, typical.

Whether I run a .jar file with "java -jar" or run a class, it is still
gives the same problem.

However, I also tried compiling the standard hello world java app and
then running it, and it ran fine ! The source to Phex is available,
but not LimeWire. It still doesn't answer the problems of running
compiled java from other places, but it will allow me to work around
it to get to my current goals, maybe.

--Rob

Christopher Capoccia

unread,
Jul 26, 2001, 2:27:59 AM7/26/01
to
I had the same problem as you. Two recommendations. One, remove
kaffe if it is installed: rpm -e kaffe. Two, reinstall jre putting
/usr/java/jre1.3.1/bin in your PATH:
PATH=$PATH:/usr/java/jre1.3.1/bin.

Fire up the executable according to the Limewire instructions. Let me
know if that helps.

Thanks,
Christopher Capoccia

0 new messages