Bright Java Tutorial

is brought to you by DoITBright LLC

Java

Using Eclipse as Java IDE

Eclipse is a famous Integrated Development Environment for Java. It is free and has a lot of available plug-ins developed by members of Eclipse.
To download Eclipse IDE, go to the official download site of Eclipse. For your quick reference, click here. The page will look something like this.

Download Eclipse IDE


Choose the Eclipse IDE for Java Developers and download it. Extract the zip file into c:\BrightJavaTutorial\eclipse folder. It should look like this after you performed the extraction.

Extracted Eclipse IDE


Go to your eclipse folder. You will see an executable file named eclipse.exe. Double click on that file. It will launch the IDE. You may want to choose your working folder. You may use c:\BrightJavaTutorial\workspace as your workspace.

Launch Eclipse IDE


You will see the welcome page of your Eclipse IDE. You may close that tab. On the navigation bar of your IDE, click on 'File', then 'New', then 'Java Project'. Enter a project name. Name it as 'CoreJava' without the single quotes of course. You may choose either clicking the 'Next' button or 'Finish' button. Lets say you clicked the 'Next' button. On the next page, you will see at the bottom the 'Default output folder:' which is set to 'CoreJava/bin'. You can leave it as it is or change it to something like 'CoreJava/classes'. Lets say you chose the latter. Finally, click 'Finish'. The 'classes' folder is where your generated class files will be placed.

New Eclipse Java Project


Click on the 'CoreJava' project, then click on the 'src' folder. Then, on your navigation bar, click on 'File', then 'New', then 'Class'. Enter 'FirstJavaEclipse' on the 'Name' text box then click 'Finish'.

New Eclipse Java File


Below will be the content of your FirstJavaEclipse.java file.

    public class FirstJavaEclipse {
        public static void main(String[] args) {
            System.out.println("Congratulations!");
        }
    }
                            
On the navigation bar, click on 'Project', then 'Clean...', then 'Clean all projects', then 'OK'. On the left side of the IDE, click on the FirstJavaEclipse.java just to make sure it is the currently selected thing on the IDE. Then, on the navigation bar, click on 'Run', then 'Run As', then 'Java Application'. Below is the screen shot of how it will look like.


Run Java On Eclipse



Back    Next