在苹果系统上搭建j2me平台

因为本人用的是苹果电脑,所以。。。

关于在苹果电脑上(或者mac系统)搭建j2me平台,中文的我只见过使用eclipse的,这次我要说的是使用netbeans来搭建这个平台。翻译自一个外国网站,但是我忘记网址了。。所以对不起原作者。在这里我也会加入一些我自己在安装的时候的经验。如果有不对的地方,还请前辈多多指正。^^

 

1) 在sun的官网下载netbeans 6.1.5 for Mac OS X.

2) 安装好之后打开。工具-组织面板-visual Mobility Designer。

3) 下载安装MpowerPlayer SDK。 这个的作用和在windows上面用的wtk是差不多的。因为wtk是没有mac版的,所以这个还是很好用的。下载很容易找到,所以麻烦大家自己百度一下了。

4) 打开netbeans 工具-java平台。 选择‘添加平台’。java Me MIDP仿真平台。选择mmp-sdk的那个文件夹就可以了。

 

理论上来说呢这个平台就算是搭建好了。但是他还要下载wtk。。。这个是为什么我还不是很理解,但是我照做了没有什么问题。如果有前辈可以解答的话,那我先谢谢了^^

 

5) 下载wtk for linux。然后打开终端,输入“unzip” 然后把那个‘bin'的文件直接拖进终端就好,这样可以避免自己输入地址。之后在你的文件里面找到已经变成若干个文件夹的wtk。选择lib,把里面可能用到的jsr75, jsr 179之类的放到mmp-sdk里面的stubs里面。

 

搞定~这样就可以了。

原贴如下:

 

To install and setup Netbeans 6.1 on Mac is no problem. Running a J2EE or J2SE application would then be fairly similar to Windows. But running J2ME has a little problem.
To work with mobile application, one can follow the helpful Netbeans + Mobility + Mpowerplayer Guide. However, the guide did not cover how to add optional java package such as jsr75, which I would cover below.
The complete steps to set up a mobile development environment with Netbeans + J2ME Mobility Pack + Visual Designer + Mpowerplayer emulator + optional java package:
Download Netbeans 6.1 IDE for Mac OS X.
Install either the Java SE or Web & Java EE version of the IDE.
After installation, start the IDE and go to Tools > Plugins.
Click the Available Plugins tab. Under Category go to Mobility.
Check the boxes for Visual Mobility Designer, and Mobility and click Install.
Download the Mpowerplayer SDK and install it.
In the NetBeans IDE main menu, choose Tools > Java Platform Manager.
Click Add Platform. Select the folder that contains the MPowerPlayer SDK (mpp-sdk). Click Search to locate the emulator in the folder. When the IDE finds the MPowerPlayer SDK, click Next.
Click Finish. The IDE registers the MIDP platform. You can now build and run a MIDP 2.0 application. But the setup still lacks optional java packages.
Download SUN WTK 2.5.2 (for Windows and Linux)
Unzip the .bin. For example, run the command:
$ unzip sun_java_wireless_toolkit-2_5_2-linux.bin
Under /lib, copy the optional java package you need eg. jsr75, jsr 179 or even midpapi21.jar. Put them under /Applications/mpp-sdk/stubs/
In your project, edit project.properties and add to platform.bootclasspath the optional java package. eg.
platform.bootclasspath=${platform.home}/stubs/mmapi.jar:${platform.home}/stubs/midp-2.0.jar:${platform.home}/stubs/cldc-1.0.jar:${platform.home}/stubs/jsr75.jar
Begin mobile development on Mac OS X!
Updates
Instead of using the 2-years-inactive Mpowerplayer emulator, we could instead use MicroEmulator. The difference is to download its Netbeans plugin here.
Tips
In step 13, editing the platform.bootclasspath property is only a temporary solution. The drawback is that when ever you change/view the project properties, platform.bootclasspath will revert back to its original.. What I do is to comment my edited platform.bootclasspath (with a #) and copy and paste it whenever the property is reverted.
他说的还是比我好的。。。想偷懒不看英文的朋友们按照我的方法做其实也足够了。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值