LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   java problems!! (https://www.linuxquestions.org/questions/linux-general-1/java-problems-10824/)

PuterFreaK 12-30-2001 12:34 AM

java problems!!
 
SOME java programs work however others give me the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: <some file>

any ideas or is it a problem with the specific program?

neo77777 12-30-2001 01:34 AM

Is it LimeWire you are trying to install?
I got bunch of such errors when tried to install it. If not then try to download java1.3.1 from java.sun.com
or blackdown
make sure the new java is in your path.

PuterFreaK 12-30-2001 02:55 AM

Quote:

Originally posted by neo77777
Is it LimeWire you are trying to install?
I got bunch of such errors when tried to install it. If not then try to download java1.3.1 from java.sun.com
or blackdown
make sure the new java is in your path.

Actually LimeWire was the one application i got working...

neo77777 12-30-2001 11:38 AM

wow, lucky you, there are ppl (like myself) who can't figure it out.
Happy New Year!

Bert 12-30-2001 02:11 PM

Happy New Year!
 
That's a missing class file I think PuterFreaK. When you download java applets from th'internet some are already compiled, some are not.
Compile the application:

%javac <some file.java>

This will create a somefile.class file. Then:

%java <some file>

With no suffix.

and that should work. If not, I'd suggest that your CLASSPATH environment variables need to be set up - look at the installation instructions you dowloaded with the JDK (sorry SDK!). If you've used a number of classes which are executed in a main program then make sure all the superclass files are compiled (that is eg. the 'engine', 'doors' and 'wheels' programs for the main 'car' class).

That should do it.

p.s. forgetting to compile superclasses is something I'm very good at ;)

PuterFreaK 12-30-2001 02:50 PM

Quote:

Originally posted by neo77777
wow, lucky you, there are ppl (like myself) who can't figure it out.
Happy New Year!

Here is what I did:

Remove Kaffe:
# rpm -e kaffe

Remove Jre:
# rpm -e jre

Reinstall Jre:
# rpm -Uiv jre<versionhere>.rpm

# ln -s /usr/java/jre1.3.1_01/bin/java /usr/bin

# export PATH="$PATH:/usr/java/jre1.3.1_02/bin"
I also added PATH="$PATH:/usr/java/jre1.3.1_02/bin" to the /etc/profile file so i wouldnt have to type that command every time I logged in.

After doing that LimeWire worked great (well....as well as to be expected..) but no other java programs work...


Bert, I dont have a command called javac....Any ideas?

Also, I wasnt trying to compile the application from the source...It got a binary.

therion12 12-30-2001 03:02 PM

Limewire works!!! thansk!! dhdhdhdhgdwbf

PuterFreaK 12-30-2001 03:07 PM

Quote:

Originally posted by therion12
Limewire works!!! thansk!! dhdhdhdhgdwbf
np

Oh, and i figured out why I didnt have the javac command...didnt have the SDK insalled...I installed that and now have that command but sitill cant get the program to work.

If anyone wants to try their luck at it grab it from http://prdownloads.sourceforge.net/j...011128.tar.gz..

Thanks!

therion12 12-30-2001 03:10 PM

Ok bad news. it doesnt work no more. I try to click on runLime.sh and nothin happans.

Btw i dont know how to add the PATH to the profile file.

therion12 12-30-2001 03:12 PM

I just have to keep adding the path to keep LIMEWIRE runnin'!!!

PuterFreaK 12-30-2001 03:15 PM

Quote:

Originally posted by therion12
I just have to keep adding the path to keep LIMEWIRE runnin'!!!
just add

PATH="$PATH:/usr/java/jre1.3.1_02/bin"

somewhere in the /etc/profile file (like at the top). Then if you are already logged in type

source /etc/profile

therion12 12-30-2001 03:22 PM

Thanks mate. FInally getting some things working in Linux hehe

therion12 12-30-2001 03:23 PM

One more question.

Can you make shortcuts ? or do i always have to cd into the application folder and execute commands?

PuterFreaK 12-30-2001 03:37 PM

Quote:

Originally posted by therion12
One more question.

Can you make shortcuts ? or do i always have to cd into the application folder and execute commands?

Yep. One way to do it is add the following line to your .bashrc file (~/.bashrc):

alias limewire=/path/to/limewire/LimeWire

and then

source ~/.bashrc

therion12 12-30-2001 03:43 PM

I'm always having problems with a KDE window locking up when i double click on HOME.


All times are GMT -5. The time now is 07:55 PM.