云南大学软件学院
实验报告
姓名:王定欢学号:20141120188 班级:日期:2016.9.11 成绩:
JAVA实验一
一、实验目的:
安装JAVA编译环境,配置环境变量路径,熟悉JAVA编译环境。编译第一个JAVA程序。
二、实验要求:
1. Install the Java development environment, including:
a) j2sdk1.7
b) eclipse
2. Configure the Java development environment and get familiar with it by
compiling and running example code form the textbook
a) J2sdk configuration in eclipse
3. Open command prompt.
To edit source code:
Type notepad HelloWorld.java.
Type in the following:
public class HelloWorld {
public static void main (String[] args) {
System.out.println("Hello World!");
}
}
Save the file.
To compile source code to byte code:
At command prompt, type javac HelloWorld.java.
To execute byte code:
At command prompt, type java HelloWorld