Myeclipse使用详细教程
时间:2014-05-18 00:48:07
收藏:0
阅读:565
下面我们先熟悉一下myEclipse的操作教程
进入myEclipse 6的界面,我们可以通过按加号按钮图标来变换myEclipse的布局。
我们生成一个java项目。
在弹出的窗口中,我们给工程起名为HelloWorld。
Contents(项目内容)
默认为建立一个新的项目;
JRE(java环境配置)
这里为我们开始设置好的JRE 1.5的环境;
Project layout(项目布局)
默认的选项为为项目建立一个独立的文件夹来存放类和资源文件;
Working sets(工作设置)
默认不选;
按next按钮,进入下一步。
把Default output folder:下的
HelloWorld/bin
改为
HelloWorld/classes
更改了输出路径目录为classes。
这里问我们要不要切换到java视图。我们选择切换,回头可以切换回来。
在src文件包上单击右键,在弹出的窗口中选New>Class生成新的类。
在弹出的窗口中我们的设置如图
Package:first(建立一个first文件包)
Name:HelloWorld(类的名字为HelloWorld)
Superclass:java.lang.Object(超类为java.lang.Object)
在Interface(接口)项,我们按Add按钮,给类增加接口。
选择serializable-jave.io接口。
Which method stubs would you like to create?(需要实现那些方法),我们都选上。
Generate comments(生成注释),结果如图:
按finish按钮,结果代码为:
重写后的代码为:
这里我们用了一个System.out.println("HelloWorld!!");的方法来进行屏幕打印输出。
执行代码。
选择Jave Application
看到Console平台输了:HelloWorld!!
如图:
简单的HelloWorld输出 例子就到这里了!希望对您学习有帮助

进入myEclipse 6的界面,我们可以通过按加号按钮图标来变换myEclipse的布局。

我们生成一个java项目。

在弹出的窗口中,我们给工程起名为HelloWorld。

Contents(项目内容)
默认为建立一个新的项目;
JRE(java环境配置)
这里为我们开始设置好的JRE 1.5的环境;
Project layout(项目布局)
默认的选项为为项目建立一个独立的文件夹来存放类和资源文件;
Working sets(工作设置)
默认不选;
按next按钮,进入下一步。

把Default output folder:下的
HelloWorld/bin
改为
HelloWorld/classes
更改了输出路径目录为classes。

这里问我们要不要切换到java视图。我们选择切换,回头可以切换回来。
在src文件包上单击右键,在弹出的窗口中选New>Class生成新的类。

在弹出的窗口中我们的设置如图

Package:first(建立一个first文件包)
Name:HelloWorld(类的名字为HelloWorld)
Superclass:java.lang.Object(超类为java.lang.Object)
在Interface(接口)项,我们按Add按钮,给类增加接口。

选择serializable-jave.io接口。
Which method stubs would you like to create?(需要实现那些方法),我们都选上。
Generate comments(生成注释),结果如图:

按finish按钮,结果代码为:
- /**
- *
- */
- package first;
- import java.io.Serializable;
- /**
- * @author Administrator
- *
- */
- public class HelloWorld implements Serializable {
- /**
- *
- */
- public HelloWorld() {
- // TODO Auto-generated constructor stub
- }
- /**
- * @param args
- */
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- }
- }
重写后的代码为:
- /**
- *
- */
- package first;
- import java.io.Serializable;
- /**
- * 第一个Java程序;
- * @author Administrator
- * @version 1.0
- */
- public class HelloWorld implements Serializable {
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- /**
- *
- */
- public HelloWorld() {
- // TODO Auto-generated constructor stub
- }
- /**
- * @param args
- */
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- System.out.println("HelloWorld!!");
- }
- }
这里我们用了一个System.out.println("HelloWorld!!");的方法来进行屏幕打印输出。
执行代码。

选择Jave Application

看到Console平台输了:HelloWorld!!
如图:

简单的HelloWorld输出 例子就到这里了!希望对您学习有帮助
评论(0)