简单问题(Jar)?

xgqing 2003-03-10 11:00:24
标准的jar文件能够下载到手机上运行吗?
现在有HelloWorld.java
应该如何成生HelloWorld.jar在Moto388上运行。
是否能用Javac,jar命令?
写个例子最好。谢谢
...全文
36 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
tinydust 2003-03-11
  • 打赏
  • 举报
回复
aiur(s!MON) 说得没有错,需要preverify,其实moto的sdk里面不是有很多例子吗?其中用来编译例子的bat你可以参考参考,里面写得很明白啊!
aiur 2003-03-11
  • 打赏
  • 举报
回复
不能
如要在手机上run,要安装sun toolkit1.04或JB+MobileSet来打包jar.
aiur 2003-03-11
  • 打赏
  • 举报
回复
javac后,要预审核(preverify),不然打包生成的jar在模拟器上是不能运行的。
安装完tookit 1.04,看userguide.pdf,其中有详细介绍
qiri07 2003-03-11
  • 打赏
  • 举报
回复
1,去下Motorola的sdk
www.motorola.com.cn

2, 去下Sun 的j2wtk
java.sun.com/j2me

3,去下borland的MobileSet
www.borland.com/jbuilder/mobileset/
alongchina 2003-03-11
  • 打赏
  • 举报
回复
javac 生成helloworld.class
jar cvfm helloworld.jar MANIFEST.MF helloworld.class打包生成jar文件

其中MANIFEST.MF 内容为
MIDlet-Name: helloworld
MIDlet-Version: 1.0.5
MIDlet-Vendor:
MIDlet-1: helloworld, /icon.png, helloworld
MicroEdition-Profile: MIDP-1.0.0
MicroEdition-Configuration: CLDC-1.0.0
MIDlet-Icon: /icon.png

13,097

社区成员

发帖
与我相关
我的任务
社区描述
Java J2ME
社区管理员
  • J2ME社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧