Java Development on Cloud Nine IDE
Cloud Nine is an online IDE that provides you with your very own Ubuntu box to create a project in. It has templates for C++, NodeJS, PHP & Wordpress, Ruby and more. There isn’t any template for Java Development. So I will go through how to setup a blank workspace for Java development. This is escpecially handy if you’re a student and only have a Chromebook to develop on.
Step One: Creating a Workspace
Go to CloudNine and create an account / login. I reccomend logging in with Github as it provides easy integration with your projects. Create a new Workspace enter a name and optional description and choose blank for the template option.
Give that a little bit to process and you should come up with a screen that looks like this:
Step Two: Installing the JDK
In the terminal section near the bottom of the screen type the following commands:
If you are not familiar with Ubuntu I will explain what is going on here. First we add a new repository to our package manager, essentially just allowing it to grab new binaries to install from the url we specified. Next we update our package manager so it is aware of all the new binaries we can download. Last we install the JDK.
Step Three: Test the Installation
I just created a basic Hello World in Java.
Create a new file by right clicking in the workspace panel and hit new file. Create a file name like HelloWorld.java
Here is the code I used:
Note that the class should be what you named your file. Minus the .java.
Now to compile and test your code you enter the following commands.
Javac compiles your code and java (your main class) runs it.
If all went well you should see “Hello, World!” in the terminal window.