j2me开发步骤
1. 系统要求
v pentium 100以上cpu
v 64mb 内存
v windows nt workstation 4.0(service pack 3)或windows 98
v 6 mb自由硬盘空间
v java 2 sdk, standard version, 版本1.2.2或者更高
2. 安装java 2 sdk
在使用motorola sdk之前必须安装jdk,standard edition。
请从http://java.sun.com/products/jdk 下载jdk,并按照sun的指导安装到pc中。
3. 安装motorola sdk
安装之前请先卸载以前版本的motorola sdk:
1. 选择"开始à设置à控制板"
2. 选择"添加/删除程序"
3. 查找到"motorola sdk components for the j2me platform"
4. 点击"卸载"
5. 用资源管理器删除"<install-dir>\motosdk"目录
安装sdk:
1. 运行"motorola_sdk.exe"
2. 按照提示安装程序
注意:安装程序需要口令,请向motorola公司索取。
4. 编写第一个程序
在目录"<install-dir>\motosdk\demo\midlets\com\mot\j2me\midlets\
tutorials\"中,用编辑器创建文件"helloworld.java"。
/*
* helloworld.java
*
* june 27, 2000
*
* ? copyright 2000 motorola, inc. all rights reserved.
* this notice does not imply publication.
*/
package com.mot.j2me.midlets.tutorials;
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
/**
* a simple hello world midlet
*
* @see midlet
*/
public class helloworld extends midlet {
/**
* main application screen
*/
private form mainscreen;
/**
* a reference to the display
*/
private display mydisplay;
/**
* creates a screen for our midlet
*/
helloworld() {
mydisplay = display.getdisplay(this);
mainscreen = new form("hello world");
/*
* create a string item
*/
stringitem stritem = new stringitem("hello", "this is a j2me midlet.");
mainscreen.append(stritem);
}
/**
* start the midlet
*/
public void startapp() throws midletstatechangeexception {
mydisplay.setcurrent(mainscreen);
}
/**
* pause the midlet
*/
public void pauseapp() {
}
/**
* called by the framework before the application is unloaded
*/
public void destroyapp(boolean unconditional) {
}
}
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器