LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-15-2002, 12:10 PM   #1
adcripps
Member
 
Registered: Mar 2002
Location: South UK
Distribution: Mandrake 8.2
Posts: 103

Rep: Reputation: 15
Setting Java path for root


I've got a java installer script which needs to be run as root.

My normal user can run java (as I edited the .bashrc with the path)

Does root have such a similar setting, because when I run my java app as root, I get an error that java could not be found.

Adam
 
Old 03-16-2002, 01:49 AM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
You set java for root exactly as for a normal user.
 
Old 03-16-2002, 03:07 AM   #3
adcripps
Member
 
Registered: Mar 2002
Location: South UK
Distribution: Mandrake 8.2
Posts: 103

Original Poster
Rep: Reputation: 15
where will i find the .bashrc file for root? In root dir?
Adam
 
Old 03-16-2002, 02:36 PM   #4
zmedico
Member
 
Registered: Feb 2002
Location: Mission Viejo, California, USA
Distribution: Gentoo
Posts: 707

Rep: Reputation: 30
java path

If you want to put java in root's PATH permanently, the /root/.bashrc is a good place to do it.

Dont forget to make sure permissions are set properly: "chmod u+x /root/.bashrc"

You can also set the PATH each time it is needed, just do "export PATH=$PATH:$JAVA_PATH"
where $JAVA_PATH refers to your java's bin directory

you may want to read the bash scripting HOWTO at http://www.linuxdoc.org
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting Java Path gtkmike SUSE / openSUSE 1 05-09-2005 04:05 PM
Setting the PATH for Java bruce64 Linux - Software 9 09-22-2003 11:19 AM
Setting java path for normal user bruce64 Linux - Software 2 07-08-2003 04:07 PM
setting path for java ahernaiz Programming 4 03-25-2003 04:30 PM
Setting Java path issues... jmizza Linux - Newbie 8 02-27-2002 08:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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