Enabling Java compiler

universetoday

Verified User
Joined
Aug 8, 2005
Messages
8
I'm trying to compile Java programs on a DirectAdmin-managed web server which I administer.

When I just run "java program", it's able to run fine.

But I can't seem to find where the compiler is located.

When I do "javac program.java", I get a "Command not found" error.

Any suggestions?
 
Can you get the output from the following commands ?
whereis java
whereis javac

I think you're running a simple jre instead of an JDK...
 
For java, I get locations:
/usr/bin/java
/etc/java
/usr/lib/java
/usr/share/java

And nothing for javac.

So I need to install the full Java environment to do compliation?
 
If you want to 'turn java source code (eg .java files)' into java classes, you kinda need the JDK to be installed.

You should install the JDK (SDK) instead of the JRE.
You can download it from http://java.sun.com.

However, to help install it, I need to know more specs about the server.
(distro, what rights you have, if it should be available to all users).
 
I'm running CentOS, and I'm sure I can find an RPM to install it. I'm just really paranoid about installing anything over top of DirectAdmin. Will there be any problems with DirectAdmin if I do the installation?
 
DirectAdmin itself won't care. Other programs may.

You probably won't find a RedHat or CentOS release rpm, because Sun's files don't meet the RedHat criteria for an opensource project.

Jeff
 
Back
Top