Java Programming : Creating a simple java project using Eclipse
In this tutorial, we will learn how to read and write a simple text to a file.
[info] You need to JDK ( Java Development Kit ) installed. JDK can be downloaded from here[/info]
[info] You need also to download Eclipse and install it. You can download it from here[/info]
1. You need to open your Programming Editor [ Eclipse ]
2. Under Eclipse, Click : File ->Project
3. Select Java Project
4. Type in the name of the project: ReadWriteFile
5. Right Click on the project ReadWriteFile inside the Package Explorer : New -> Class
6. Type in the the Name of the class as for example : MyProgram
7. Type in the following code inside your new class:
public class MyProgram { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("Hello World!"); } }
8. Click on the Green Button to compile and run your program.
9. The output of your program should be shown here: