Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 07-23-2004, 03:50 AM   #1
LQ Newbie
Registered: Jul 2004
Location: Reading, UK
Distribution: Mandrake 10.0
Posts: 8

Rep: Reputation: 0
Cannot set the path for java

I have downloaded j2sdk1.4.2_05.
I tried to set the path as follows:
su <enter>
password <enter>

tried to run javac but command fails

Any ideas?

Note that I have tried to modify the .bashrc directly but that also fails....

Old 07-23-2004, 06:16 AM   #2
Registered: Apr 2004
Location: Edinburgh
Posts: 78

Rep: Reputation: 15
Hello again

Could you be more precise?

To check if the path is ok, do 'java -version'. If not, it might be because the actual command is export PATH=$PATH:bla bla bla...

For compilation of a java program, you have to set the CLASSPATH environment variable.
Old 07-23-2004, 06:31 AM   #3
Registered: Dec 2003
Location: Petaling Jaya
Distribution: Ubuntu
Posts: 475

Rep: Reputation: 31
because you set the path as root. Set the path as normal use. Use java as normal use. PATH=/usr/local/javasdk/bin:"${PATH}"

Put that line in your .bashrc....
And you don't need set the classpath if you want just compile basic java program. You learn to set up classpath in java tutorial......

Just take it easy.....


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
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
Please help! I still can not set JAVA path preswang Linux - Software 9 11-01-2003 08:51 PM
set up path,classpath in linux(slaware9) for java Manjula.S Linux - Software 5 10-06-2003 11:38 PM
how to rum java on linux and set path for the same mita_majumdar Linux - Newbie 2 06-02-2003 12:50 AM
how to rum java on linux and set path for the same mita_majumdar Linux - Newbie 1 05-26-2003 03:29 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:46 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration