Using the Java Compiler
So you’ve written (or downloaded) java code and you need to compile it. Easy enough.
- First, upload your .java source code using ftp. Remember to upload your code in ASCII format.
- Then, telnet to your account and log in.
- Navigate to the directory in which you uploaded your .java source code.
- At your telnet prompt, type:
javac yourcode.java
where yourcode is the name of the java source code you uploaded.
- Hit ENTER and a file named yourcode.class will be created.
If the above command does not work, try issuing the command using the full path to javac:
/usr/local/java/bin/javac yourcode.java
Please note that java servlets are not supported on many servers due to security issues.