1、下载 JDK 例如:
![](https://img-blog.csdn.net/20140409205100953?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYjA3MDE=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
j2sdk-1_4_0_012
2、JDK包安装完成后,需要设置环境变量。用鼠标右键单击桌面上的图标“我的电脑”,选择“属性”项,出现标题为“系统特性”的对话框,点击“高级”标签,可以看见有一个“环境变量”按钮
3、环境变量中更改
![](https://img-blog.csdn.net/20140409204732578?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYjA3MDE=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
![](https://img-blog.csdn.net/20140409204809828?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYjA3MDE=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
![](https://img-blog.csdn.net/20140409204824093?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYjA3MDE=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
include
、
lib
和
path
没有就新建。。
4、记事本编写程序
//程序文件名称为HelloWorld.java
public class HelloWorld
{
public static void main(String args[])
{
System.out.println("Hello World");
}
}
5、javac编译
6、java运行