IDE
This tutorial demonstrates how to use IDEs to write a Java program on ENCS lab computers.
Windows
1 Open Eclipse
Windows > eclipse_OXYGEN
2 Create a Java project
File > New > Project
Name your project, e.g. :Hello_World
. Then click Finish.
3 Perspective
If you are prompted to choose a perspective, you can click Open Perspective.
If after clicking you cannot see the perspective, you may need to click the up-left button to toggle on the view.
After clicking you should see the following project we just created.
4 Create a Class
src (right click) > New > Class
Name your class, e.g.: Main
. Then click Finish.
5 The main method
Now we can write the main method in our newly created class.
6 Run
7 Hello World
We can see the output of our program in the console.
Linux
1 Open Eclipse
Applications > Programming > Eclipse Neon
You may see the following error, just click OK to ignore it.
2 Create a Java project
File > New > Project
Name the project, e.g.: Hello_World
. The click Finish.
After this step you should see the following view.
3 Create a Class
src (right click) > New > Class
Name your class, e.g.: Main
. The click Finish.
4 The main method
Now we can write the main method in our newly created class.
5 Run
6 Hello World
We can see the output of our program in the console.