First step towards JAVA
https://letsknowaboutcomputer.blogspot.com/2011/12/first-step-towards-java.html
Now we are going to Build and Run our first program in Java.
Starting a new program
Eclipse will create the directory for you.
Select File->New->Project from the menu. You will get the New Project dialog.
Select the Java option and click on the Next> button. (Do not select the Simple option!). In the following dialog, give a name to the project. A good choice for the name is the directory that contains the files. Then uncheck the Use default box, and provide the full path of the directory that contains the files, such as
Select File->New->Project from the menu. You will get the New Project dialog.
Select the Java option and click on the Next> button. (Do not select the Simple option!). In the following dialog, give a name to the project. A good choice for the name is the directory that contains the files. Then uncheck the Use default box, and provide the full path of the directory that contains the files, such as
/home/cay/hw1/or
c:\homework\hw1\
Click on the Finish button.
Select New->Class from the
menu.
Enter the name of the class. If you want a main method for this class, check the box public static void main(String[] args) and then click Finish.
Click finish and you will a work area to write and run code.
Write this code in your editor.
public class MainClass { public static void main(String[] args) { System.out.println("Java"); } }
After writing code go to
File->Save.To compile program click over play button or go to RUN menu and compile.Output and Errors will be shown in smaller rectangle below the editor.If error occurs,Read the error carefully then closely watch code, i hope your first program will run successfully.C U.