Re: Setting up j2sdk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2003-07-24 at 09:41, shrike-list-request@xxxxxxxxxx wrote:

Setting the CLASSPATH fixed the problem.  As to why on RHL box need the
CLASSPATH to be set and the other did not, was that the system that
could not run java has an Oracle client installed and that intatalation
has a CLASSPATH set.

> Arindam Dey said:
> > On Thu, 2003-07-24 at 03:29, Robert Fausey wrote:
> >> I am having problems getting java programs to run under RH9.  I
> >> installed j2sdk-1.4.2-fcs and created /etc/profile.d/java.sh that
> >> contains
> >>         export JDK_HOME=/usr/java/j2sdk1.4.2
> >>         export PATH=$PATH:$JDK_HOME/bin
> >>
> >> I can compile Java programs, but they will not run, they run fine on
> >> other systems, I keep getting the following error
> >>
> >> Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld
> >
> > <jdk.sh>
> >
> > #!/bin/bash
> >
> > CLASSPATH=/usr/java/jdk1.3.1/lib:/usr/java/jdk1.3.1/lib/tools.jar:
> > /usr/java/jdk1.3.1/lib/dt.jar:/usr/java/jdk1.3.1/jre/lib/rt.jar:
> > /usr/java/jdk1.3.1/lib/mail.jar:/usr/java/jdk1.3.1/lib/activation.jar:
> > /usr/java/jdk1.3.1/jre/lib/i18n.jar:/usr/java/jdk1.3.1/jre/lib/javaplugin.jar:
> > /usr/java/jdk1.3.1/jre/lib/sunrsasign.jar
> >
> > PATH="$PATH:/usr/java/jdk1.3.1/bin"
> >
> > export PATH CLASSPATH
> >
> > </jdk.sh>
> >
> > The above is what is there in my jdk.sh or java.sh in your case. You
> > will have to change the version to suit you. I think your problem is
> > that CLASSPATH variable is not defined in your java.sh. since you are
> > getting the  NoClassDefFoundError. If you define the CLASSPATH variable
> > with the proper jar files then everything should be ok.
> >
> > bye,
> >
> > --
> > Arindam Dey
> 
> It is usually not necessary to touch CLASSPATH
> My first suggestion would be to do the 2 following:
> 
> $ which java
> $ rpm -qf "`which java`"
> 
> The first one will tell you if you have another java installed
> (which is common since there is one in the RH distro)
> 
> The second one will tell you the package that contains it.
> 
> My suggestion would be to 'rpm -ev whatever_the_package_is_called'
> I can't remember the package but I remove it every time I
> install RH :-)
> 
> That may fix your problem
> Your JAVA_HOME/PATH stuff looks like it should be OK.
> 
> Of course, if that doesn't help then something is definitely
> wrong :-)
> 
> -- 
> -Cheers
> -Andrew
> 
> MS ... if only he hadn't been hang gliding!
> 
> 
> 




-- 
Shrike-list mailing list
Shrike-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/shrike-list

[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux