使用eclipse搭建j2me手机开发环境
2010-12-02 13:15
525 查看
使用eclipse搭建j2me手机开发环境
1 下载 eclipse3.1 / jwtk2.2 / eclipseme1.2.3
eclipse3.1的下载地址:http://www.eclipse.org/
jwtk2.2 的下载地址:http://java.sun.com/j2me/download.html
eclipseme1.2.3的下载地址:http://eclipseme.org/
2 安装 eclipse 到 d:/eclipse3.1 ;
jwtk2.2 到 d:/jwtk2.2 (为jwtk2.2打patch)
eclipseme1.2.3 到 d:/eclipseme1.2.3
3 配置eclipseme到eclipse
< 1>启动 eclipse->点击 help ->点击 software updates ->点击 find and install ->选择 search for new features to install->点击 next ->点击 new archived site -> 选择 eclipseme1.2.3.zip - > 点击 finish -> 重新启动eclipse
<2>点击 windows ->选择 preference ->选择 J2ME ->选择 platform component ->点击wirelessToolkits->点击右键 选择 add wirelessKit ->选择 jwtk2.2的安装目录->点击 finish
<3>开启测试项目 ,重新启动eclipse,file ->new ->project ->j2me ->j2me midlet suite ->命名项目名称为testJ2me
<4>验证环境搭建,在项目中编写一个名为HelloWorldMIDlet 的java程序,源码如下:
package com.agile.j2me.core;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
import javax.microedition.lcdui.TextBox;
import javax.microedition.lcdui.Display;
public class HelloWorldMIDlet extends MIDlet {
private TextBox tBox ;
public HelloWorldMIDlet() {
super();
tBox = new TextBox("测试程序","hellWorld",20,0);
// TODO Auto-generated constructor stub
}
protected void startApp() throws MIDletStateChangeException {
// TODO Auto-generated method stub
Display.getDisplay(this).setCurrent(tBox);
}
protected void pauseApp() {
// TODO Auto-generated method stub
}
protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
// TODO Auto-generated method stub
}
}
<5>运行 -> 选择run as -> emulated j2me midlet.
<6>手机模拟界面出现helloworld字样,配置成功.
1 下载 eclipse3.1 / jwtk2.2 / eclipseme1.2.3
eclipse3.1的下载地址:http://www.eclipse.org/
jwtk2.2 的下载地址:http://java.sun.com/j2me/download.html
eclipseme1.2.3的下载地址:http://eclipseme.org/
2 安装 eclipse 到 d:/eclipse3.1 ;
jwtk2.2 到 d:/jwtk2.2 (为jwtk2.2打patch)
eclipseme1.2.3 到 d:/eclipseme1.2.3
3 配置eclipseme到eclipse
< 1>启动 eclipse->点击 help ->点击 software updates ->点击 find and install ->选择 search for new features to install->点击 next ->点击 new archived site -> 选择 eclipseme1.2.3.zip - > 点击 finish -> 重新启动eclipse
<2>点击 windows ->选择 preference ->选择 J2ME ->选择 platform component ->点击wirelessToolkits->点击右键 选择 add wirelessKit ->选择 jwtk2.2的安装目录->点击 finish
<3>开启测试项目 ,重新启动eclipse,file ->new ->project ->j2me ->j2me midlet suite ->命名项目名称为testJ2me
<4>验证环境搭建,在项目中编写一个名为HelloWorldMIDlet 的java程序,源码如下:
package com.agile.j2me.core;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
import javax.microedition.lcdui.TextBox;
import javax.microedition.lcdui.Display;
public class HelloWorldMIDlet extends MIDlet {
private TextBox tBox ;
public HelloWorldMIDlet() {
super();
tBox = new TextBox("测试程序","hellWorld",20,0);
// TODO Auto-generated constructor stub
}
protected void startApp() throws MIDletStateChangeException {
// TODO Auto-generated method stub
Display.getDisplay(this).setCurrent(tBox);
}
protected void pauseApp() {
// TODO Auto-generated method stub
}
protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
// TODO Auto-generated method stub
}
}
<5>运行 -> 选择run as -> emulated j2me midlet.
<6>手机模拟界面出现helloworld字样,配置成功.
相关文章推荐
- 使用Eclipse搭建J2ME手机开发环境
- 使用EclipseME+Eclipse3.0+J2METoolKit2.2 搭建 J2ME 开发环境
- 在Eclipse上搭建Nokia手机的J2ME开发环境
- Eclipse上搭建Nokia手机的J2ME开发环境
- JAVA开发环境的搭建(配置JAVA开发环境)以及使用eclipse从头一步步创建java项目
- Eclipse3.1.1+EclipseME1.5+WTK2.2搭建J2ME开发环境
- Eclipse搭建J2ME开发环境
- 使用eclipse进行android C/C++ 开发环境搭建
- 使用Eclipse搭建C/C++开发环境
- 在Java EE+eclipse中使用tomcat7.0 开发环境搭建
- 基于Eclipse的Android开发环境搭建及初步使用教程
- Linux下使用Eclipse搭建GTK+开发环境
- 使用Eclipse搭建php的debug开发环境
- 使用Eclipse+PyDev搭建python开发环境
- Eclipse3.1.1+EclipseME1.5+WTK2.2搭建J2ME开发环境
- 使用eclipse搭建c/c++开发环境的详解步骤
- Java开发环境的搭建以及使用eclipse从头一步步创建java项目
- 使用Eclipse开发及测试Spark的环境搭建及简单测试
- 使用Eclipse+PyDev+EclipseHtmlEditor搭建Django开发环境
- ubuntu 15.04下使用Eclipse搭建Hadoop开发环境