LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-24-2004, 01:57 PM   #1
pjpeter
Member
 
Registered: Sep 2004
Distribution: Debian Sarge RC1 Kernel 2.6.7.1
Posts: 46

Rep: Reputation: 15
Question 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
 
Old 09-24-2004, 02:07 PM   #2
jim mcnamara
Member
 
Registered: May 2002
Posts: 964

Rep: Reputation: 36
It's a PATH problem. You have two choices
Code:
specify the path yourself (I making up one here)
/opt/bin/lang/java ......
or change you PATH
export PATH="/opt/bin/lang:$PATH"
java ..............
 
Old 09-24-2004, 02:24 PM   #3
pjpeter
Member
 
Registered: Sep 2004
Distribution: Debian Sarge RC1 Kernel 2.6.7.1
Posts: 46

Original Poster
Rep: Reputation: 15
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
 
Old 09-24-2004, 02:30 PM   #4
pjpeter
Member
 
Registered: Sep 2004
Distribution: Debian Sarge RC1 Kernel 2.6.7.1
Posts: 46

Original Poster
Rep: Reputation: 15
Recovered old Java installation, apparently it didn't install correctly the second time I did it.

Checking docs now.
 
Old 09-24-2004, 03:02 PM   #5
pjpeter
Member
 
Registered: Sep 2004
Distribution: Debian Sarge RC1 Kernel 2.6.7.1
Posts: 46

Original Poster
Rep: Reputation: 15
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash -command not found- ALInux Linux - Newbie 3 12-30-2006 12:41 PM
bash: command not found intels_ss Linux - Newbie 5 07-20-2005 07:41 PM
bash -command not found- K3V Linux - Newbie 7 09-30-2004 03:57 PM
(Debian) bash: java: command not found pjpeter Linux - Newbie 3 09-25-2004 02:59 PM
java command - "bash: java: command not found" ??? RedHat123 Programming 2 07-16-2002 11:09 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration