bash: java: command not found
HI, I have a problem in that I am very familiar with Dr Java under the Windows OS and would like to use it on my Debian Sarge system. I have a project due basically in 2 days and I need to get started on it ASAP. I tried using Eclipse but its way too large for this project - maybe for the next project when I have more time it will be good to use but not yet. In order to run Dr Java I need to enter the command:
java -jar drjava-stable-20040326.jar Now, this returns the reply from the Terminal: bash: java: command not found Now I know that indicates that java is not installed. However, I have installed it using the Graphical interface in the installer found on http://java.sun.com/j2se/1.4.2/download.html. Now I need to get it so my program works perfectly on Java 1.4.2, so I need this version. What have I done wrong? After I ran the Java GUI installer I did nothing else as part of the install. Is there something more I need to do? Thanks, Peter |
It's a PATH problem. You have two choices
Code:
specify the path yourself (I making up one here) |
There appears to be nothing in the java folder near where you specified except in the /opt/j2sdk1.4.2_04/j2sdk1.4.2_04/_uninst directory.
So what I did was set export PATH="/opt/j2sdk1.4.2_04/j2sdk1.4.2_04/_uninst" I also tried export PATH="/opt/j2sdk1.4.2_04/j2sdk1.4.2_04/" and export PATH="/opt/j2sdk1.4.2_04/" No luck though : (. Any time I try java -anything- it gives the java command not found error Or am I missing anything? I'm still a Linux Newbie : (. Peter |
Recovered old Java installation, apparently it didn't install correctly the second time I did it.
Checking docs now. |
Fixed the hard and dirty way via copying the .jar file into my java/bin directory and making a launcher with the command: /opt/j2sdk1.4.2_04/bin/java -jar /opt/j2sdk1.4.2_04/bin/drjava-beta-20040908.jar
Thanks, Peter |
All times are GMT -5. The time now is 10:46 AM. |