
You can see how there is so much more functionality than the text editors that we used like Notepad and VS Code. That wasn't so bad, was it? Eclipse is designed to make Java development easier and automates so much in one package. You can check the box that says to “Always save resources before launching.”Ĭlick OK and your output will show in the console below!


It looks like a green play button shown below: And guess what? That’s easy too! Just click on the Run button under the toolbar. You can turn off this feature by going to Project -> uncheck Build Automatically
ECLIPSE IDE FOR BEGINNERS CODE
Your code is being compiled as you are typing it! Go ahead and make an error and see how it looks! You will see below, that I changed the semicolon to a colon and there is a red ‘X’ on the left side to indicate a compilation error! Neat, huh? Put the following in line 7 in your main method for the output statement. Most of your code has been written for you, and all you have to add is the line to print out your statement. Make sure that is checked and click Finish. You will see that it will be a part of the package created and will contain a method stub ‘public static void main(String args) that we have been using. You can create the name of the class according to Java naming conventions. This class will print out the sentence “I am using Eclipse.” Try it out! Right click on src -> New -> Class It is in this folder, where we will create our first class, HelloWorld. This is where you will save all of your class files. In the Project Explorer on the left pane, below the project name, you will see a folder called src. This way you can connect many files together in this project under the umbrella of one web development project. You can give the package a name like ‘com.openclassrooms’. Right-click HelloWorld -> New -> Package -> Java -> Java Project. You can create one by right-clicking the name of the project. A package will allow you to link all your files and is especially important for web development projects because Eclipse will put it all together for you with no extra hassle! Web development projects typically contain multiple files and folders. This enables you to use multiple files, classes, and more!įirst, create a Java package because it is best practice, especially for web development.

On the left pane, you will see the Package Explorer that will contain all the files to your project. You can now create a name for your project and ensure that there is an execution environment and development kit selected.

You can start a new project by going to File -> New -> Java Project. A new wizard will pop up that will automate the setup of your very first Java project! To change the perspective when you open a Java project, go to Window -> Perspective -> Open Perspective -> Java. Ĭreate your first Java project Configure and set up your projectĮclipse supports Java EE and Java SE. Java EE stands for "Enterprise Edition." It's built on top of Java SE, which stands for "Standard Edition." For our purposes, we'll use Java SE. Now that you've got everything downloaded, what do you do with it? Let's dive in.
