Set up The Eclipse IDE for a Java Project
Now let's get to the programming!
How to create a Java ProjectRight-click the Package Explorer (Left Panel of Eclipse) and create a new Java Project:
(Note: if you can't see any of the panels mentioned here, just go to Window>> Show View and select the missing panel. You can also relocate it by dragging and dropping wherever you want)
Click next and again you can modify some of the specifics of the project. This time Check "Allow output folders for source folders" and click finish:
How to Create a Package and a Java ClassNow that we have a Java project, right-click on the src folder (the src or "source" folder will contain all our source code) and create a new package. This is for organization purposes.
Name it however you want, but remember that it should start with a non-capital letter to follow the Java Standards (this will make your code more readable to other programmers). Some suggestions are: "main" (maybe too generic), "world", "gui" (for Graphic User Interface). I will go with main.
Create a new Class by right-clicking your new package as shown in the image below:
Again you can name it however you want, this time it should start with a capital letter. Don't worry if you forget these Java standards because Eclipse will remind you and suggest you to change it if you do so:
Some suggested names are "MyFirstClass", "MainClass" or even "HelloJava". Again I will go with just "Main" (I like to keep it simple for small projects like this).
So here we have our first Java code. These three lines are the first lines you will see depending on the name of the package and the name of the class that you chose.