|
需要:
jdk,wtk就不用说了. 下载j2mepolish :http://www.j2mepolish.org/downloads/j2mepolish-1.2.4.html#download 直接双击jar文件(java -jar j2mepolish-1.2.4.jar)根据向导安装即可,很简略. 在eclipse中运行samples里面的menu例子. 拷贝 ${polish.home}/samepse/menu到eclipse的工作目录. 然后建立一个java工程名为 menu (会主动导进拷过来的menu里面的src,res等等) 直接ant运行build脚本即可天生jar,jad文件(会发明有许多版本,不同语言,不同平台,不同midp版本的) 要配置天生哪些版本,或者平台的jar,jad,可以在build.xml里面配置,如下地位: 语言(默认有德文和英文)可以在如下地位配置:(我把德文改称了中文) dir="resources" defaultexcludes="yes" excludes="readme.txt" > 留心,假如配置了一个cn的话,要在resources里面添加一个messages_cn.txt 内容可以如下: ####################################### # # # This file contains translations # # of the application. # # Key and Value are separated # # by the equals-sign "=". # # # ####################################### # You can also define localized preprocessing variables here, by starting the # definition with "var:". Variables defined here will override the ones defined # in the -section of your build.xml. # Variables starting with "polish." or "MIDlet-" don't need to start with "var:" # by the way. var:MyExampleVariable=你好,midlet var:GameName=测试 # Setting J2ME Polish variables: polish.command.ok=确认 polish.command.cancel=取消 polish.command.select=选择 polish.command.options=选项 # It's also possible to set MIDlet-attributes for your JAD- and MANIFEST-files here. # If you like you can start them with "var:" as well, but it is not needed. # Again MIDlet-attributes defined override the one defined in the - # and -sections of your build.xml MIDlet-Description=中文哦 MIDlet-Name=J2ME Polish Beispiel MIDlet-Delete-Confirm=J2ME Polish # Setting appplication specific translations: cmd.StartGame=${GameName} 开端 cmd.Quit=退出 cmd.ShowLog=log 显示 menu.StartGame=${GameName} 开端! menu.LoadGame=${GameName} 读取 |
