LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-07-2005, 05:48 PM   #1
Pyro-dragon
LQ Newbie
 
Registered: Jan 2005
Location: UK
Distribution: Mint 13
Posts: 19

Rep: Reputation: 0
Setting up paths


Hi there
I have just got the sun java sdk installed on my Fedora 2 based laptop and I am having issues with working out how to create a path.

I want to set up my system so that when I want to run the java compiler I can just type 'javac' instead of having to type in the full path everytime.

Thanks.
 
Old 03-07-2005, 06:06 PM   #2
Linux~Powered
Member
 
Registered: Jan 2004
Location: /lost+found
Distribution: Slackware 14.2
Posts: 849

Rep: Reputation: 33
Two things you can do. One is create a .bash_profile file in your home directory and add...

Code:
export PATH=":/usr/path/to/java"
Then after you did that in the terminal run..


Code:
source .bash_profile
So it reads the .bash_profile so you don't have to logout and log back in for it to take effect. The other thing you can do is add the path to /etc/profile and run...

Code:
source /etc/profile
when you're done. To make sure it's in your path run...

Code:
echo $PATH
 
Old 03-07-2005, 06:32 PM   #3
Pyro-dragon
LQ Newbie
 
Registered: Jan 2005
Location: UK
Distribution: Mint 13
Posts: 19

Original Poster
Rep: Reputation: 0
I have tried that and it is still nit working. Also the /etc/profile appears to be some kind of script, I have no idea where to enter stuff.
 
Old 03-07-2005, 06:34 PM   #4
Linux~Powered
Member
 
Registered: Jan 2004
Location: /lost+found
Distribution: Slackware 14.2
Posts: 849

Rep: Reputation: 33
Quote:
Also the /etc/profile appears to be some kind of script, I have no idea where to enter stuff.
Well yeah. In /etc/profile look for...

# Set the default system $PATH:
PATH="/usr/local/bin:/usr/lib/jre1.5.0_01:/usr/bin:/bin:/usr/X11R6/bin:/usr/games"

Quote:
I have tried that and it is still nit working.
Did you make .bash_profile executable?

chmod 755 .bash_profile

then source .bash_profile

Last edited by Linux~Powered; 03-07-2005 at 06:36 PM.
 
Old 03-07-2005, 06:46 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
http://www.linuxquestions.org/questi...71#post1131371 ;}


Clean, up-grade proof and unlikely to break stuff
since you don't modify anything pre-installed ...


Cheers,
Tink
 
Old 03-07-2005, 07:04 PM   #6
Pyro-dragon
LQ Newbie
 
Registered: Jan 2005
Location: UK
Distribution: Mint 13
Posts: 19

Original Poster
Rep: Reputation: 0
I've managed to get it working using symbolic links. Mys system must be a bit messed up. None of the things you guys said helped. I don't blame you, I've probably mashed the system by playing arround with it too much. Oh well, live and learn. Thanks for the help anyways guys.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting Library paths RedHAT9 (N00B) Jaykay3k Linux - Software 1 03-03-2005 02:15 AM
Setting Paths? bluelaguna Linux - Software 2 08-07-2004 03:31 PM
setting paths bmagyar Linux - Software 10 11-01-2003 06:08 PM
Automatically resolving WINDOWS paths to pre-configured Linux paths gazzy Linux - General 1 09-05-2003 11:15 PM
Setting Paths ken22 Linux - Software 1 06-19-2003 02:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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