Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 04-13-2005, 12:37 AM   #1
LQ Newbie
Registered: Apr 2005
Location: south africa
Distribution: suse 9.3
Posts: 6

Rep: Reputation: 0
setting a path

i have just installed java jdk 1.5 on linux suse 9.1. the problem is that i am used to use the javac command to compile my java files and when i use it now i get an error stating that the javac command cannot be found.

a friend told me that he had a similar problem in windows and that he had to set a path to the java / bin directory. how can i do this in linux? please help!!
Old 04-13-2005, 12:48 AM   #2
Senior Member
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 48
Lotsa good info here:
Look for "Setting the PATH for Linux"

Old 04-13-2005, 12:52 AM   #3
Registered: Aug 2004
Location: Melbourne, Australia
Distribution: fc5/Gentoo
Posts: 57

Rep: Reputation: 15
You can set this in your .profile found in your home directory (it may be .bash_profile?)
(Unless you want it available to all users then you can set it in /etc/profile)

There should be a variable called PATH,


You should add you java path similar to above but point it to your java path,

Don't forget to update your environment

$source ~/.profile
Old 04-13-2005, 01:32 AM   #4
Senior Member
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
The command you'll want to use, so you don't overwrite your existing $PATH is this:
export PATH=$PATH:/usr/local/bin/jvm/java1.5/bin
Old 05-28-2005, 03:45 AM   #5
Registered: May 2004
Location: Student of University of Mumbai, Maharastra State, India
Distribution: Redhat Linux 9.0, Knoppix LIVE CD, Ubuntu Live CD, Kubuntu Live CD
Posts: 483

Rep: Reputation: 30
hey..all.. I know I am replying to this...after a long time....

But there's one thing....
There's no specific thing CALLED PATH in /etc/profile....
its a file with some code....

What I did is this....

first wrote these two sentences in /etc/profile
export PATH
then as said by tim1235, I wrote

source /etc/profile I have it in my PATH variable......

I hope this wud help ppl who wud search ...for this...


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting the path powerlifter450 Linux - Software 18 07-05-2006 10:46 AM
setting a path mjkramer Linux - Newbie 8 11-18-2004 07:35 PM
Setting the path Milkman00 Linux - General 2 07-26-2002 08:44 AM
setting PATH tda Linux - Newbie 1 04-29-2002 12:54 PM
Setting up PATH Sonny Linux - Newbie 4 01-28-2002 01:02 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:55 AM.

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