How to run java on cloud9?



I’m new to cloud9 and I’m not sure how to run java code on here. I have read some articles about it and I was informed that if I do

java Testing

It will run my file assuming it is name “Testing”.

My code is just
public class Testing {
public static void main (String args []){
System.out.println(“Hello World”);
I got an error that says “bash: javac: command not found”.
Some people say I need a create my own builder and runner so I did that too according to this video.

Don’t speak his language, but I followed the description and his steps and it still does not work.

Can anyone help me with this? I need to be able to code on cloud9 because I will be using a chromebook in class.

Thank you!


try installing java by running

sudo apt-get update
sudo apt-get install default-jdk



Thank you! It works!


To Update to the latest version …1.8.0_151 as of today … type this in command like on fresh site

curl -sL | sudo bash -


Hey…Guys…One Quick Question…
When I Created My Workspace With “Blank Template” For Java Project, It Came With Java Compiler and Required Dependencies Pre-installed…Then How Come It Won’t Be Working?


I think because they are not updating the templates… so you have to update them to latest versions… I just start with clean machine and load everything myself. Then I keep a “Copy” of it as a blank-slate environment (with the latest versions ) and clone it for a new project etc.
I hope that helps. when updates come out I update my blank-slate.