LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 08-27-2003, 11:55 AM   #1
joel112
Member
 
Registered: Apr 2003
Distribution: Debian
Posts: 169

Rep: Reputation: 30
Setting the path....


Right i am at my wits end with this one...

I want the path to java to be added to the path on user login... now this works fine in .bash_profile for root, but it doesnt work for my users.... i get

export: export: No such file or directory

The text in the file is this

export PATH=$PATH:/usr/local/j2sdk1.4.2/bin/

i tried addint to rclocal, but its still not working... andyone any ideas?
 
Old 08-27-2003, 12:01 PM   #2
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
I wouldn't do it this way for a start. Adding these things to path is a bad idea.

The best way to do this is adding a symlink to /usr/bin

su to root and then type

cd /usr/bin
ln -s /usr/local/j2sdk1.4.2/bin/java java

This should work fine, and keeps path clean of weird stuff.
 
Old 08-27-2003, 02:35 PM   #3
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
If you want to add it to the PATH environment variable,
take a look at these threads.
http://www.linuxquestions.org/questi...threadid=82056
http://www.linuxquestions.org/questi...threadid=80417
 
Old 08-27-2003, 03:04 PM   #4
linuxJaver
Member
 
Registered: Jul 2003
Location: Jakartax, ID
Distribution: slack9.1+,9.1,rh9
Posts: 203

Rep: Reputation: 30
Add

export PATH=$PATH:/usr/local/j2sdk1.4.2/bin/

into /etc/profile

If u want it to be global gilty also for ur users ..
If u onlu add it to root/.bash_profile, the users can not source/read it during the login time, but add it to the users/.bah_profile should work .. In this cas u better put that added bash_profile in /etc/skel, so that each time u created an user, that added .bash_profile will be copied into user home dir.

Easiest would be put it in /etc/profile, I recommend also add lines like

export JAVA_HOME=PATH_TO_THE_JAVA_INSTALLATION to the profiles, otherwise some classpaths n many JavaLibraries, runtime couldn't be found if u compiles java-codes as if u put link to javaInstallation/bin/java into /usr/local/bin ..

That links point only to a single java-binary, not to javac, jar n many other tools .. To create so mnay link is absolutely not a clean solution than to add $JAVA_HOME/bin to $PATH ..
 
Old 08-28-2003, 04:00 AM   #5
joel112
Member
 
Registered: Apr 2003
Distribution: Debian
Posts: 169

Original Poster
Rep: Reputation: 30
cheers guy... i knew there was somewhere to add it... thanks....
 
Old 08-28-2003, 02:27 PM   #6
heesi
LQ Newbie
 
Registered: Aug 2003
Posts: 7

Rep: Reputation: 0
Great advices linuxJaver! THX!!!
 
  


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 the path powerlifter450 Linux - Software 18 07-05-2006 11:46 AM
Setting the path Milkman00 Linux - General 2 07-26-2002 09:44 AM
setting PATH tda Linux - Newbie 1 04-29-2002 01:54 PM
Setting up PATH Sonny Linux - Newbie 4 01-28-2002 02:02 PM
PATH SETTING webboss Linux - Newbie 2 03-17-2001 06:29 PM


All times are GMT -5. The time now is 12:29 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration