Program Output goes here....

Cmd line arguments:

JOCR-Java Version 8, 9, 10 Online Compiler & Run tool allows you to write, compile and run your java program online. You can save your java program online sothat you can load and run later.

How to Use?

Write your java code in the Text Area provided above. Don't place package name for the java program. (Press F11 to maximize editor, Esc to normal. Before pressing F11, hide side bar by clicking menu toggle button, if the side bar is visible). The class name should match with the file name given in the text box. Here default class name is Test. If the class name is changed, then change the file name accordingly. You don't need to append .java with the file name. When you complete the java program, just click on the Compile and Run button. If there is no error, then the output will be displayed in the Output Console. You can also check the error prior to run the program by clicking on the Check for Errors button.

Running java program with user input.

For giving user input, you can use Command Line Arguments options. As input console is not available, Scanner or any other input statement may be avoided.

Use Command Line Arguments for Runtime Input.

Write your java program that uses the command line arguments and enter the input in the Cmd Line Arguments text box. Then click on Compile and Run button. For more than one input, use white space between inputs.

Saving your Work.

You can save your program by clcking the save button. You will get the URL to load the java program later.


Save your Java Program Online
Full Screen Editor
Resizable Editor
Example Programs Easy to use

Running Examples

We have given some example programs for test run. Just select the example program from combo box and click on Compile and Run.

You can find Java / J2ee Tutorials, example programs at Javaonlineguide.net