How to Compile Java Without JDK
Compiling Java source code typically requires the Java Development Kit, or JDK, which includes the Java compiler, or javac, the Java Runtime Environment, or JRE, and various libraries to aid programming. However, the JDK is a large file that takes up resources on the computer, and not all platforms have their own version of JDK -- although most do. In these cases, you can go online and have your Java programs compiled by a simple Web service.
Instructions
-
-
1
Write the Java source code in the text editor. Save it under the name "prog1.java."
-
2
Navigate to innovation.ch/java/java_compile. This website contains a form to upload Java Source files.
-
-
3
Upload the class file. Click the "Browse" button next to the first Source File text field. Navigate to the "prog1.java" file and select it.
-
4
Select compilation options. The site offers various compilation flags, such as verbose debugging and optimization. Select your options, along with the version of Java you want the file compiled in.
-
5
Click the "Compile" button. The site uploads the file and compile it on its own servers. If there are no errors, the next page presents you with a link to download the compiled Java class, which you can download and run on your computer.
-
1