Click to See Complete Forum and Search --> : javac location/ installation


Rui Alves
07-19-2004, 11:30 AM
Hi!

I trying to compile a java program but it seems that even though I have the sun java packageinstalled I'm missing the javac java compiler.

I read elsewhere that javac should be in /usr/java/j2re1.4.2_04/bin but it's not!

Any tips? How can I find/ install javac in my setup (mandrake 10.0)?

TIA!

blingbling!!
07-19-2004, 01:07 PM
Is your JAVA_HOME variable set? Here's mine:

bash-2.05b$ echo $JAVA_HOME
/usr/lib/java

If it's set then have a poke round in the directory it points to. One of the subdirectories will have javac in it. Then, add it to your path, and you're off!

If JAVA_HOME is not set then you'll have to do it. Check the docs that came with the JDK to see how to proceed.

hth
--Robin

Rui Alves
07-21-2004, 09:08 AM
Originally posted by blingbling!!
[B]Is your JAVA_HOME variable set? Here's mine:

bash-2.05b$ echo $JAVA_HOME
/usr/lib/java

yep, my $JAVA_HOME variable is set to /usr/java/j2re1.4.2_04 which I think is ok as it contains some programs including java itself. It does not have contain javac though!

BTW a find / -name *javac* returns nothing so I really don have javac installed.

Does anybody know a way of installing javac? Maybe an rpm package?

Thanks!

aNoob
07-21-2004, 09:42 AM
You have installed only JRE (Java Runtime Environment).
javac is not a part of JRE but JDK(development kit).
I think you downloaded the wrong file.
Download the JDK from java.sun.com and then give it a try again :D

Rui Alves
07-21-2004, 10:22 AM
Originally posted by aNoob
You have installed only JRE (Java Runtime Environment).
javac is not a part of JRE but JDK(development kit).
I think you downloaded the wrong file.
Download the JDK from java.sun.com and then give it a try again :D

yep, that's it. Thanks!