最近做了个J2ME的小程序,在开发过程中遇到了一个问题,分享如下:
当程序连接网络时,会自动跳出"....Is it OK to use Air Time"的提示框,而且每次连接都会得到这个提示。
解决方案:http://www.mernin.com/blog/?p=21
- Start the Sun Java Wireless Toolkit “KToolbar” application and select Edit, Preferences
- Locate the Security category and select the following settings
- Security Policy: MSA
- Security Domain: manufacturer
- Save these preferences
- From your NetBeans project, select the project properties.
- Locate the Signing settings (inside the Build settings) and select the following settings:
- Sign Distributon: Yes (or checked)
- Keystore: Built-in keystore
- Alias: untrusted
- You might also need to Export this key to the Java SDK/Emulator using the button provided
- Save these settings and rebuild your project
大致来说就是在Sun Java Wireless Toolkit里面设置自己开发的程序的级别,如果选择manufacturer的话,提示框会根本不出现,我选择的是identified_third_party,选择这个会在程序第一次连接的时候提示一次。
程序做好,放到手机上和模拟器上一样。