First Java Project in Eclipse with Hello World Examples By Main Method

In this tutorial we will learn about how to create simple java project in eclipse and respective configuration.

What we need before start the code, I'm using as mention below and already installed in my system:
1. JDK1.6 or +
2. Eclipse
3. Windows OS
4. Basic knowledge of java

Let's start:


Verify the JDK installation

Open the command prompt and verify the java installation
Type the 
C:\>javac -version
javac 1.7.0_25

C:\>java -version

java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b17)
Java HotSpot(TM) Client VM (build 23.25-b01, mixed mode, sharing)

Now java installation got verified, as installed JDK1.7.0_25

Verify the Eclipse installation

Go the the installation directory of eclipse and click on the eclipse.exe
e.g C:\eclipse\eclipse-java-mars-1-win32\eclipse\eclipse.exe

Write the HelloWorld.java file in eclipse

Right click on the src folder
New
Class
Type the class file name: HelloWorld
Type the package name: com.atozexamples
Finish

package com.atozexamples;

public class HelloWorld {

public HelloWorld() {

}

public static void main(String[] args) {

System.out.println("Hello world examples!!!");

}
}



First Java Project in Eclipse with Hello World Examples By Main Method



Video:

In English


In Hindi

हिंदी




This is all about the, how to write the first java project in eclipse.


No comments:

Post a Comment