This video tutorial teaches you to run your first Java Program in popular integrated development tool Eclipse.
Java Video Tutorial: How to run first Java program in Eclipse?
Eclipse development tool is an Java based Integrated Development Environment(IDE) for writing, compiling, debugging and running the Java based application. It also various types of projects including Web applications and Enterprise application. In this tutorial I will teach you to create and run your first Java program from Eclipse tool.
It is easy to run the Java code from Eclipse as compared to the process of running the Java program from command line. Eclipse provides the tool for highlighting the syntax error in Java program, which makes programming much easier. Eclipse also automatically compiles the source code of the project to ease the development of the application.
Software required:
- You should have Java Development tool installed on your computer
- JDK is configured properly
- Eclipse IDE is already installed and running
Steps to run first Java program in Eclipse:
- Create a new project in Java
- Create package to store your Java classes
- Create Java class
- Write method to print the data on console
- Run the program by right clicking on the code window and then selecting run as Java Application
Following Video tutorial shows you how to create and run the first Java program in Eclipse IDE:
Source code of the first Java example
Here is the source code of the Java program we have used in this tutorial. This program is automatically generated by the Eclipse IDE while creating the Java class:
package com.devmanuals; public class HelloWorld { /** * @param args */ public static void main(String[] args) { System.out.println("Hello World"); } }
For printing the message on console we have used the following line of code:
System.out.println("Hello World");
The above method prints the "Hello World" message on the console. The following code:
System.out.println("Hello World");
uses the System.out.println () method for printing message on console.
[ 0 ] Comments