Closed Thread Icon

Preserved Topic: Compiling Java programs on RedHat (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=21134" title="Pages that link to Preserved Topic: Compiling Java programs on RedHat (Page 1 of 1)" rel="nofollow" >Preserved Topic: Compiling Java programs on RedHat <span class="small">(Page 1 of 1)</span>\

 
Ultrakapy
Obsessive-Compulsive (I) Inmate

From:
Insane since: Aug 2002

posted posted 01-23-2003 20:00

On windows machines, you have to set the path in order to compile java programs directly using the javac compiler. Otherwise you have to specify the directory then use the compiler (e.g., C:\j2sdk.x.x_x\bin javac myprogram.java). How can I set the "path" on Red Hat linux so I don't have to specify the directory each time I want to compile something??

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 01-23-2003 20:09

You have to set the Path enviornment variable to your java directory.

I use FreeBSD with the bash shell, and I set my path in a .bashrc file which has the lines.

PATH=/usr/local/bin:/usr/bin/:/usr/X11R6/bin; export PATH

Which would set the paths as you would on that other operating system you are using. It is all about the PATH man.

Veneficuz
Paranoid (IV) Inmate

From: A graveyard of dreams
Insane since: Mar 2001

posted posted 01-23-2003 20:14

On *nix you have a special enviroment variable called PATH. When you type a command the computer searches every path in the PATH variable for the executable file. To see what your current PATH variable is type this in the promt(all commands assume that you are using bash):
echo $PATH
To change the variable, write this in the command promt:
PATH=$PATH:<path to java/bin>
This will add the <path to java/bin> to the current PATH variable. If you want to make the new PATH variable the default PATH variable you have to edit the $HOME/.bashrc file. Just add the PATH=... line to the .bashrc file and the computer will automaticly make the change.

_________________________
"There are 10 kinds of people; those who know binary, those who don't and those who start counting at zero"

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 01-24-2003 00:08

Wouldn't that be 11 types of people and not 10 types of people?

Veneficuz
Paranoid (IV) Inmate

From: A graveyard of dreams
Insane since: Mar 2001

posted posted 01-24-2003 00:18

Nope, it is 10 kinds of people.

10 in binary is 2 in decimal. The first two types are easy, you know binary or you don't. If you start counting from zero 2 is the third number you reach: 0, 1, 2. Therefore three kinds of people

_________________________
"There are 10 kinds of people; those who know binary, those who don't and those who start counting at zero"

[This message has been edited by Veneficuz (edited 01-24-2003).]

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 01-24-2003 04:20

Shit, I am not the last one at all then... and it was right there in front of me.

Ultrakapy
Obsessive-Compulsive (I) Inmate

From:
Insane since: Aug 2002

posted posted 02-01-2003 01:01

Sorry it took me a while to get back here, but thanks for all your help!!

« BackwardsOnwards »

Show Forum Drop Down Menu