LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Java installation??? (https://www.linuxquestions.org/questions/linux-software-2/java-installation-478698/)

win2suse 08-30-2006 03:56 AM

Java installation???
 
Hallo all,
just now I downloaded
jdk-6-beta2-linux-i586.bin
in my usr/local, and extracted it by
./jdk-6-beta2-linux-i586.bin,
finally I got
usr/local/jdk1.6.0
Then I mkdir java in usr/local, and programmed the HalloWorldApp.java in this new directory.

The problem is that
when I type
javac HalloWorldApp.java
"bash: javac: command not found" comes up.
if I type
./javac /usr/local/java/HalloWorldApp.java in usr/local/jdk1.6.0/bin where the javac file is found, it seems to work, and I got HalloWorldApp.class in the same directory as HalloWorldApp.java. However when I try to run
./java /usr/local/java/HalloWorldApp
"Exception in thread "main" java.lang.NoClassDefFoundError: /usr/local/java/HalloWorldApp" turns up.

I'd like to know whether it means that my java engine was not correctly installed. How could I get around this problem?

Thanks in advance, win2s
BTW, my linux distro is debian 2.6.8-3-386

continue at
http://www.linuxquestions.org/questi...d.php?t=479111

rickh 08-30-2006 08:45 AM

Quote:

I'd like to know whether it means that my java engine was not correctly installed.
I think it does. With kernel 2.6.8, I assume you're using Sarge. Number one, I think it's time to move up to Etch, where you may choose to download Sun Java from the repositories.

On the other hand, even using Etch, I still choose to download and install the Sun Java bin from Sun. Here are instructions for doing it correctly.


All times are GMT -5. The time now is 09:37 PM.