LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 05-28-2003, 02:10 PM   #1
C8H10N4O2
Member
 
Registered: Dec 2002
Location: Australia
Distribution: SuSE, Vector Linux
Posts: 51

Rep: Reputation: 15
Adding Java to my environment path?


I just download some P2P software that requires the Java Runtime Environment to be installed. I went and downloaded J2SE 1.4 and installed it, it all went smoothly. But the P2P program wouldn't run. I finally decided to RTFM and learned that I need to "Make sure you have your Java installation directory in your environment PATH" which is all well and good - except that I don't know what the hell it means.

Can someone tell me how to add it?

Thanks.
 
Old 05-28-2003, 02:12 PM   #2
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
export PATH=$PATH:/path/to/java/executable

My path is /usr/java/j2sdk1.4.1_02/bin
 
Old 05-28-2003, 02:22 PM   #3
manthram
Member
 
Registered: Feb 2002
Location: Fairfax, VA
Distribution: RedHat 8, Mandrake9.1, Slack9
Posts: 456

Rep: Reputation: 31
put that in .profile or .bashrc so that it will be added to the path everytime you login
 
Old 05-28-2003, 02:22 PM   #4
C8H10N4O2
Member
 
Registered: Dec 2002
Location: Australia
Distribution: SuSE, Vector Linux
Posts: 51

Original Poster
Rep: Reputation: 15
Thanks, much appreciated.
 
Old 05-28-2003, 02:23 PM   #5
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
Quote:
Originally posted by manthram
put that in .profile or .bashrc so that it will be added to the path everytime you login
No need to do that unless you are java'ing it up all the time.
 
Old 11-10-2003, 07:46 PM   #6
Wraith2288
Member
 
Registered: Apr 2003
Distribution: Redhat 9, windows XP
Posts: 78

Rep: Reputation: 15
oi... I've done this, I don't get any error messages, but I still get messages saying that java is not a valid system command (I'm using xnap)... what does this mean? I know that I put the correct path (/usr/share/java)...
Here's how it went:

[me@localhost gnutella]$ whereis java
java: /usr/share/java
[me@localhost gnutella]$ export PATH=$PATH:/usr/share/java
[me@localhost gnutella]$ xnap
/usr/bin/xnap: line 18: java: command not found
[me@localhost gnutella]$ java
bash: java: command not found

and I know I have Java properly put in... the test page on the Sun website loaded just fine. Am I missing something?

When I do "echo $PATH". /usr/share/java shows up

the only thing that I can think of is that maybe /usr/share/java is something else... how else can I find where it would be installed?

Last edited by Wraith2288; 11-11-2003 at 08:26 AM.
 
Old 04-19-2004, 01:38 PM   #7
jmax24
Member
 
Registered: Apr 2004
Posts: 39

Rep: Reputation: 15
i just installed the java2sdk myself and the command i use is

export PATH=PATH:/usr/java/j2sdk1.4.2_04/bin
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Java Programming: Java Runtime Environment not found when trying to compile murbz Linux - Software 2 03-26-2009 03:04 AM
Adding Java to root users PATH? infornography Linux - Newbie 5 05-26-2005 07:49 AM
setting environment PATH heathpitts Linux - Newbie 26 12-03-2004 10:15 AM
adding java jdk to path snecklifter Linux - Newbie 4 11-01-2004 02:58 PM
Adding Java to my path in the .bash_profile file .... jmax24 Linux - General 5 04-20-2004 01:14 PM


All times are GMT -5. The time now is 05:02 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration