LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 07-15-2004, 07:59 PM   #1
SolarBear
Member
 
Registered: Oct 2003
Location: Québec, Canada
Distribution: Gentoo 2005.0(desktop), Debian 3.0 r2 (server)
Posts: 105

Rep: Reputation: 15
Root can't install using javac


I thought root was all-mighty... but it seems not.

I tried installing Jabberwocky, a Java IDE for Lisp. I tried installing it as a normal user but of course I couldn't write to /usr so I switched to root. I couldn't install.

bash-2.05b# ./install
Compiling Install.java
./install: line 3: javac: command not found
Compiling AbstractXMLConfig.java
./install: line 5: javac: command not found
Compiling XMLConfigArgument.java
./install: line 7: javac: command not found
Compiling XMLConfigClass.java
./install: line 9: javac: command not found
Compiling XMLConfigField.java
./install: line 11: javac: command not found
Compiling XMLConfigMethod.java
./install: line 13: javac: command not found
Compiling XMLConfigObject.java
./install: line 15: javac: command not found
Compiling XMLConfigReader.java
./install: line 17: javac: command not found
Compiling InterqctionCommqnds.java
./install: line 19: javac: command not found
Compiling Util.java
./install: line 21: javac: command not found
Start the install program
./install: line 24: java: command not found


But a normal COULD use javac without problem. What could be causing this ? Do different users have different PATH variables ?
 
Old 07-15-2004, 08:16 PM   #2
rgiggs
Member
 
Registered: Apr 2004
Location: berkeley, ca
Distribution: slk10, winxp
Posts: 313

Rep: Reputation: 30
Re: Root can't install using javac

Quote:
Originally posted by SolarBear
Do different users have different PATH variables ?
of course. PATH is user-customizable. so, root's PATH doesn't include the path to java. see where java is by looking at PATH for the normal user. then modify root's PATH accordingly.
 
Old 07-15-2004, 09:00 PM   #3
Mephisto
Member
 
Registered: Oct 2002
Location: Washington D.C, USA
Distribution: Slack 12, Etch, Gutsy
Posts: 453

Rep: Reputation: 31
Did you log in as root or did you use su? Java is on the path if you installed it, but not when you su root.
 
Old 07-15-2004, 09:54 PM   #4
rgiggs
Member
 
Registered: Apr 2004
Location: berkeley, ca
Distribution: slk10, winxp
Posts: 313

Rep: Reputation: 30
Quote:
Originally posted by Mephisto
Java is on the path if you installed it, but not when you su root.
what do you mean? even if java is not in PATH when you su, i'm quite sure that you can just do PATH=$PATH:<path to java> to add it, at least temporarily.
 
Old 07-16-2004, 07:59 AM   #5
SolarBear
Member
 
Registered: Oct 2003
Location: Québec, Canada
Distribution: Gentoo 2005.0(desktop), Debian 3.0 r2 (server)
Posts: 105

Original Poster
Rep: Reputation: 15
Okay, I'll check that when I get back home... just to be sure, was the way to change PATH was export PATH=$PATH:/path:... ?
 
Old 07-16-2004, 01:01 PM   #6
Mephisto
Member
 
Registered: Oct 2002
Location: Washington D.C, USA
Distribution: Slack 12, Etch, Gutsy
Posts: 453

Rep: Reputation: 31
Tried to post this morning but for some reason was not letting me.

Quote:
Originally posted by rgiggs
what do you mean? even if java is not in PATH when you su, i'm quite sure that you can just do PATH=$PATH:<path to java> to add it, at least temporarily.
Yes you could fairly easily. But if he is using su to get to root and not manually setting the path to javac then this may be the problem.
Remember his questions: "But a normal COULD use javac without problem. What could be causing this ? Do different users have different PATH variables ?" The fact that you get a different path in a shell as su from what you would get at a login shell answers these questions. I just wanted to clarify whether it was truly root's PATH settings that were borked or if he was using su.

As rgiggs said, chances are all you would need to do is "PATH=$PATH:/usr/lib/java/bin" or wherever you installed the JVM if you did not use the one that came with Slack 10.
 
Old 07-18-2004, 09:32 PM   #7
SolarBear
Member
 
Registered: Oct 2003
Location: Québec, Canada
Distribution: Gentoo 2005.0(desktop), Debian 3.0 r2 (server)
Posts: 105

Original Poster
Rep: Reputation: 15
Okay guys, indeed root and user did not have the same PATH. I added it to PATH temporarily and it did the job just fine. Thanks.
 
  


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
javac zaicheke Programming 2 10-05-2004 10:46 PM
javac rehadt 9.0 confuzzled Linux - Software 11 07-21-2004 01:08 AM
javac doesn't work spchehe Linux - Software 3 08-01-2003 06:52 PM
javac linuxRules Linux - General 3 05-23-2002 07:45 AM
javac linuxRules Linux - General 0 05-21-2002 09:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:32 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
Open Source Consulting | Domain Registration