aspose file tools*
The moose likes Linux / UNIX and the fly likes how to set java env in linux??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "how to set java env in linux???" Watch "how to set java env in linux???" New topic
Author

how to set java env in linux???

HaoZhe Xu
Ranch Hand

Joined: Nov 03, 2003
Posts: 222
i am using RedHat linux 8.0, i installed j2sdk follow the install instruction, how to set the environment so that i can compile/run java code/application in any directory???


[url]Olnex.net[/url]
[SCJP 1.2, SCJD, SCWCD]
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Moving to Linux/UNIX forum.


[Jess in Action][AskingGoodQuestions]
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9046
    
  10
Did you add $JAVA_HOME/bin to your PATH?


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Guy Allard
Ranch Hand

Joined: Nov 24, 2000
Posts: 776
To make it available to all non-root users:

-Add /etc/sysconfig/java

It looks like:



-Add /etc/profile/java.sh

It looks like:



The root user still has to fend for him/her self.

Regards, Guy
HaoZhe Xu
Ranch Hand

Joined: Nov 03, 2003
Posts: 222
is /etc/sysconfig/java a file or a directory?

there is only /etc/profile.d directory, should i create java.sh inside it or create both profile directory and java.sh???
Guy Allard
Ranch Hand

Joined: Nov 24, 2000
Posts: 776
/etc/sysconfig/java

is a file. Add it with the correct exports.

The rest should have said:

/etc/profile.d/java.sh

not /etc/profile/java.sh, sorry.

Guy
Paul Michael
Ranch Hand

Joined: Jul 02, 2001
Posts: 697
You might also want to visit this site:

Java for Linux HOWTO



SCJP 1.2 (89%), SCWCD 1.3 (94%), IBM 486 (90%), SCJA Beta (96%), SCEA (91% / 77%), SCEA 5 P1 (77%), SCBCD 5 (85%)
HaoZhe Xu
Ranch Hand

Joined: Nov 03, 2003
Posts: 222
Thanks very much, but i still have a question: how to set the env so that applet and web-start work well?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16070
    
  21

Applets are run under control of your web browser. In order for your browser to run applets, it must have a java applet plugin installed, musch as it must have a Shockwave plugin installed to play Shockwave. The browser's preferences are stored with the other browser settings, usually in a hidden file or directory in the user's home directory.

There's also often a set of system-wide default settings, which in *n*x is generally in the /etc directory. These, too, are installed by the browser, though in some cases there may be an agreement among vendors for a common settings repository.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
wood burning stoves
 
subject: how to set java env in linux???