How do I compile/run a Java file?

How do I run Java code in Codio

Ian avatar
Written by Ian
Updated over a week ago

If you are familiar with the Linux command line, you can also open up a terminal window from the Tools->Terminal menu.

Once this appears, you should enter the following

java Filename

But also check out 

  • the Java Hello World starter pack that serves as a template for Java projects in Codio and the .codio file has been configured so you can run the contained   file

  • or the Personal Playground assignment in the Java course where other options are explained including where the  .codio file has been configured so you can Run any 'current' file. 

Personal Playground isn't a tutorial so you can play with it by creating or running any file.

See for more on how you can configure the .codio file

Did this answer your question?