Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compiling in Linux

Status
Not open for further replies.

kliz0328

Programmer
Nov 7, 2005
138
0
0
US
I am trying to compile so java files in Linux and know nothing about Linux. I was wondering hot to set the class path to point to the javac.exe file?
 
you don't point CLASSPATH at the compiler - you point your PATH.

If java is installed in /usr/java, then :

export JAVA_HOME=/usr/java
export PATH=$JAVA_HOME/bin:$PATH

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
I'd look first for a Linux installation of Java, that javac.exe didn't sound very good outside Win*

Cheers,
Dian
 
Sedj-
Is that something that I type in on the commandline then?

Do you think it would just be a better idea to download Suns Java for Linux?
 
>>>> Is that something that I type in on the commandline then?
Yes, or you can add it to your user's profile, so that you don't have to do it again and again.

>>>> Do you think it would just be a better idea to download Suns Java for Linux?

Depending on which Linux distro you are using, you may have GCJ (GNU Java compiler) or Kaffe, or Sun Java. If you do not have Sun's, then I would certainly install it.

Whether or not you have Sun's JDK, you will still need to do the commands I showed earlier.

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
By the way, a /usr/java/javac -version at command line would be enough to check which version, if any, is installed.

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top