@echo off
@rem ***************************************************************
@rem ** Copyright 2000 Motorola, Inc. All rights reserved.
@rem **
@rem ** runMyDevice.bat
@rem **
@rem ** Runs the J2ME desktop emulator
@rem **
@rem ** Command line arguments:
@rem ** 1. class name to run
@rem **
@rem ** Assumptions:
@rem ** - This batch file is being run from the
@rem ** install directory
@rem **
@rem ***************************************************************@if NOT "%1"=="" set MYCLASS=%1
@if "%1"=="" set MYCLASS=com.mot.j2me.midlets.httpTest.HttpTest@rem **
@rem ** Make sure the classpath is not set
@rem **
set CLASSPATH=@rem **
@rem ** Set the path to the resource directory
@rem **
set J2ME_RESOURCE_DIR=..\lib\resources@rem **
@rem ** Now invoke the emulator
@remcd ..\bin
java -Djava.library.path=../lib -classpath ./Emulator.jar;./ConfigTool.jar com.mot.tools.j2me.emulator.Emulator -classpath../demo/midlets;../lib -deviceFile resources/device.props javax.microedition.midlet.AppManager %MYCLASS% -JSA 1 1
cd ..\scripts
@rem ***************************************************************
@rem ** Copyright 2000 Motorola, Inc. All rights reserved.
@rem **
@rem ** runMyDevice.bat
@rem **
@rem ** Runs the J2ME desktop emulator
@rem **
@rem ** Command line arguments:
@rem ** 1. class name to run
@rem **
@rem ** Assumptions:
@rem ** - This batch file is being run from the
@rem ** install directory
@rem **
@rem ***************************************************************@if NOT "%1"=="" set MYCLASS=%1
@if "%1"=="" set MYCLASS=com.mot.j2me.midlets.httpTest.HttpTest@rem **
@rem ** Make sure the classpath is not set
@rem **
set CLASSPATH=@rem **
@rem ** Set the path to the resource directory
@rem **
set J2ME_RESOURCE_DIR=..\lib\resources@rem **
@rem ** Now invoke the emulator
@remcd ..\bin
java -Djava.library.path=../lib -classpath ./Emulator.jar;./ConfigTool.jar com.mot.tools.j2me.emulator.Emulator -classpath../demo/midlets;../lib -deviceFile resources/device.props javax.microedition.midlet.AppManager %MYCLASS% -JSA 1 1
cd ..\scripts
举个例子:
有一个类名叫:HelloWorld.class
把它拷贝到开发包的Bin目录下面,然后把上边BAT文件的
%MYCLASS% 换成HelloWorld,也就是类名!然后保存,运行这个BAT,应该可以看
到效果了
fatal error: udpserver could not be created
javax/microedition/midlet/appcontext::run@71可是这个class 可以通过jbuilder 运行
呵呵,这应该是你程序的错误啊。你写个HELLOWORLD试试。
另外,MOTO的模拟器做的不敢恭维,已经发现过一些BUG。
我遇到过的是不能处理PNG图片的双缓冲,后来在J2mewtk上运行相同的代码,效果却是好的。
还有,MOTO前不久的388比赛你知道吗,有部分参赛者进入了复赛,可是同样的程序,在模拟器上是好的,安装在手机上运行确不行了。http://java.sun.com/products/j2mewtoolkit/
java -Djava.library.path=../lib -classpath ./Emulator.jar;./ConfigTool.jar com.mot.tools.j2me.emulator.Emulator -classpath../demo/midlets;../lib -deviceFile resources/device.props javax.microedition.midlet.AppManager %MYCLASS% -JSA 1 1
cd ..\scripts能否介绍一下 JAVA属性的设置,JAVA 后的意思;
-classpath ..
为何意思
..是代表上一目录