LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 05-07-2004, 04:09 PM   #1
randomx
Member
 
Registered: Feb 2003
Location: Hawaii
Distribution: Debian
Posts: 130

Rep: Reputation: 16
Unhappy suse 9.0 java path for root


I would like to set up the java path for root and the rest of the users.

steps I've done. Success on randomx user but got nowhere for root:

**I do have a valid java directory on user randomx home directory. I added this line export PATH=/home/randomx/jdk1.4/bin/:$PATH to ~/.bashrc

to test it, I typed from shell $>java -version
java version "1.4.2_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06)
Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode)

Everything is beautiful.

But I cannot get the same results for root even if I try to set it in /etc/profile --usually the global settings on any linux distro but SuSE.

for root I get:
#>java -version
bash: java: command not found

again, I just want to get java for root. Any help would be greatly appreciated.

I've tried the export PATH command for root, but it's a hassle to do that every time. I just want something that stays there for ever --like on root's or global profile.

thanks in advance,

Randomx

Last edited by randomx; 05-07-2004 at 04:13 PM.
 
Old 05-07-2004, 04:18 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
/etc/bash.bashrc.local

There are several options for globally declaring environment variables.

I've had luck with creating a host-specific "/etc/bash.bashrc.local". If it exists (it won't, unless you create it), then it's read automatically by the standard shell init files. And it's probably poor form to modify those standard files directly (for example, your configuration might be blown away when you upgrade).

Hope that helps .. PSM
 
Old 05-08-2004, 07:47 PM   #3
randomx
Member
 
Registered: Feb 2003
Location: Hawaii
Distribution: Debian
Posts: 130

Original Poster
Rep: Reputation: 16
Thumbs up thanks bro

thanks man, I got it. I didn't know that trick.

randomX
 
  


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
How do I retain the PATH in the root account even when I switch to root using su? thearchitect Linux - Newbie 1 08-13-2005 12:02 AM
Adding Java to root users PATH? infornography Linux - Newbie 5 05-26-2005 07:49 AM
Adding to Path for root in Suse stefarg Linux - General 1 04-21-2004 05:58 PM
Java can't find package, but PATH set correctly (j2se1.4.0, java.util.regex package) Ethan Programming 5 02-06-2004 09:55 PM
Setting Java path for root adcripps Linux - General 3 03-16-2002 02:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:34 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