Using the Java Compiler

Using the Java Compiler

So you’ve written (or downloaded) java code and you need to compile it. Easy enough.

    1. First, upload your .java source code using ftp. Remember to upload your code in ASCII format.
    2. Then, telnet to your account and log in.
    3. Navigate to the directory in which you uploaded your .java source code.
    4. At your telnet prompt, type:

      javac yourcode.java

      where yourcode is the name of the java source code you uploaded.

    5. 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.