标签:cat 64位 百度搜索 method 右键 reference nbsp cto ted
下载之后是一个.zip格式的压缩包,解压之后的文件目录如下:
创建桌面快捷方式
创建之后,可以在桌面看到Eclipse的图标
Window-->Preference
展开Java-->Installed JRE
点击add,添加JRE运行环境
点击Next
点击Directory..
点击Finish,勾选刚刚导入的JRE
点击OK,这样就导入JRE的运行环境啦
注意包的命名规范,在new一个类出来
填写类名,勾选public static void main(String[] args),点击finish将会出现如下代码片段
TestJRE.java
package com.scd.hello; public class TestJRE { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub } }
程序的入口在main函数里面,在里面填写 System.out.println("Hello World");
package com.scd.hello; import java.io.PrintStream; public class TestJRE { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("Hello World"); PrintStream ps = System.out; ps.println("HelloWorld"); } }
将鼠标悬停在代码片段上,右键-->Run As-->Java Application
在终端中查看运行结果
Java集成开发环境--Eclipse for J2EE配置JRE运行环境
标签:cat 64位 百度搜索 method 右键 reference nbsp cto ted
原文地址:http://www.cnblogs.com/shootercheng/p/6286213.html