- IDE: Editplus, Netbean, Eclipse
1. Install JDK
- Download
- Install
2. Set path environment for java in WINDOWS
- Right click My Computer, choose Propertites, Click tab Advanced, Click button Environment Variables
- In system variables section, choose variable "Path", click button Edit
- In the end of textbox "Variable value", input ; and path of jdk folder installation
example :
- before: ...%SystemRoot%\System32\Wbem
- after: ...%SystemRoot%\System32\Wbem;C:\j2sdk1.4.2_02\bin
3. Install Editplus
4. Config Editplus to compile and run java
- Click menu Tools, choose Configure user tools,
- Click group name to set new group "Java"
- Click Add Tool>> Program
- Set for run java: Command: ...java.exe , Argument: $(FileNameNoExt)
5. Test first program "Hello World!"
- open editplus, choose a directory, new file hello.java
- input this text
public class hello {
public static void main(String[] arguments) {
System.out.println("Hello World");
}
}
Save lại với tên file là hello.java
- Compile: Ctrl + 1, nó sẽ tạo ra một file class: java.class
cú pháp dịch bằng tay : javac hello.java
- Run: Ctrl + 2
cú pháp run bằng tay : java hello
6. Using Eclipse
Không có nhận xét nào:
Đăng nhận xét