简体   繁体   English

在netbeans 8.0中添加Java ME平台

[英]Adding Java ME platform in netbeans 8.0

I am having trouble installing the ME platform for Netbeans 8.0 - I have: 我在为Netbeans 8.0安装ME平台时遇到问题 - 我有:

  • Installed Netbeans IDE 8.0 已安装Netbeans IDE 8.0

  • Installed jmesdk-3.4 已安装jmesdk-3.4

  • Installed the jmesdk-3.4 plugin & activated it in Netbeans 安装了jmesdk-3.4插件并在Netbeans中激活它

When I try to create a New Java ME > Mobile application project I get a warning saying 当我尝试创建一个新的Java ME>移动应用程序项目时,我得到一个警告说

No Java ME Platform found. 找不到Java ME平台。 Please add at least one 请至少添加一个

When i try to add the java platform by locating the jmesdk-3.4 folder, it tells me no platform was detected automatically(failed) and it requires me to add manually.But adding it manually just creates more confusion. 当我尝试通过查找jmesdk-3.4文件夹来添加java平台时,它告诉我没有自动检测到平台(失败),它需要我手动添加。但是手动添加它只会造成更多混乱。 need help please. 需要帮助。

How to install JAVA ME SDK 3.4 如何安装JAVA ME SDK 3.4

在此输入图像描述


  • Click the Accept License Agreement option. 单击“接受许可协议”选项。
  • Create an Account or login 创建帐户或登录
  • Download the Java ME SDK installer file and save it to any location on your computer. 下载Java ME SDK安装程序文件并将其保存到计算机上的任何位置。
  • Double-click the installer file to run the installer, and follow the instructions. 双击安装程序文件以运行安装程序,然后按照说明进行操作。
  • Remember the installations directory. 记住安装目录。 eg -> U:\\Java_ME_platform_SDK_3.4 例如 - > U:\\ Java_ME_platform_SDK_3.4

When the installation is complete, 安装完成后,

the Java (TM) ME Platform SDK Device Manager icon appears in the Windows system tray. Java(TM)ME平台SDK设备管理器图标显示在Windows系统托盘中。

在此输入图像描述

  • Unzip the downloaded oracle-jmesdk-3-4-rr-nb-plugins.zip to a folder 将下载的oracle-jmesdk-3-4-rr-nb-plugins.zip解压缩到一个文件夹
    eg oracle-jmesdk-3-4-rr-nb-plugins 例如oracle-jmesdk-3-4-rr-nb-plugins

在此输入图像描述

How to activate Java ME support in NetBeans IDE? 如何在NetBeans IDE中激活Java ME支持?

  • Choose Tools > Plugins from the main IDE's toolbar. 从IDE主工具栏中选择“工具”>“插件”。
  • In the Plugins dialog box, click the Installed tab and select Java ME in the list of available features. 在“插件”对话框中,单击“已安装”选项卡,然后在可用功能列表中选择“Java ME”。
  • Click Activate. 单击“激活”。
  • At the Welcome panel of the Installer dialog box, click Activate. 在“安装程序”对话框的“欢迎”面板上,单击“激活”。
  • When the activation is successfully completed, click Finish. 成功完成激活后,单击“完成”。
  • Click Close to close the Plugins dialog box. 单击“关闭”以关闭“插件”对话框。

在此输入图像描述

How to register Java ME SDK as a platform in NetBeans IDE? 如何在NetBeans IDE中将Java ME SDK注册为平台?

  • Choose Tools > Java Platforms in the IDE. 在IDE中选择“工具”>“Java平台”。
  • In the Java Platform Manager dialog box, click Add Platforms. 在“Java Platform Manager”对话框中,单击“添加平台”。
  • In the Add Java Platform dialog box, select Java ME CLDC Platform Emulator and click Next. 在“添加Java平台”对话框中,选择“Java ME CLDC平台模拟器”,然后单击“下一步”。
  • Select the folder where Java ME SDK is installed in the Choose directory to search for platforms dialog box and click Open. 在“选择要搜索平台的目录”对话框中选择安装Java ME SDK的文件夹,然后单击“打开”。
  • Ensure the Java ME SDK platform is chosen in the Add Java Platform dialog box and click Next. 确保在“添加Java平台”对话框中选择了Java ME SDK平台,然后单击“下一步”。
  • After the IDE detects the platform, click Finish. IDE检测到平台后,单击“完成”。 Java ME SDK should now be registered in the IDE. Java ME SDK现在应该在IDE中注册。
  • In the Java Platform Manager dialog box, click Close. 在“Java Platform Manager”对话框中,单击“关闭”。

在此输入图像描述在此输入图像描述在此输入图像描述

How to install the downloaded plugin 如何安装下载的插件

  • Go to Tools -- Plugins -- Downloaded 转到工具 - 插件 - 已下载
  • Click Add Plugins 单击“添加插件”
  • Navigate to the Plugin folder eg oracle-jmesdk-3-4-rr-nb-plugins 导航到Plugin文件夹,例如oracle-jmesdk-3-4-rr-nb-plugins

在此输入图像描述

  • Select all .nbm 选择所有.nbm

在此输入图像描述

  • Restart Netbeans 重启Netbeans

在此输入图像描述

enjoy the new program examples 享受新的程序示例

在此输入图像描述在此输入图像描述

Done 完成

More Information wiki.netbeans 更多信息wiki.netbeans

I did what the other answer recommends, which worked, but only when using Netbeans IDE 7.4 and JDK 1.7 for a 32-bit system ( https://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html ). 我做了另一个答案推荐的,但是只有在32位系统使用Netbeans IDE 7.4和JDK 1.7时才这样做( https://www.oracle.com/technetwork/java/javase/downloads/java-archive- downloads-javase7-521261.html )。 Currently using a Windows 10 64-bit system. 目前使用的是Windows 10 64位系统。 Note that I did not accept any updates for the required Java ME plugins, as I hear that might make things crash. 请注意,我不接受所需Java ME插件的任何更新,因为我听说可能会导致崩溃。

I heve readed that that can be being caused by the new serialization filter feature in the JDK( Serialization Filtering . Seems that it was added to JDK 8 after the 112 update so on this update of the JDK it shall work but it certainly is possibly to use the Java ME SDK on JDKs with this feature. I did it at least on JDK 1.8.0_192. To this I had to make some changes on the java.security file. The chages were: 我认为这可能是由于JDK中的新序列化过滤器功能( 序列化过滤)引起的 。似乎它是在112更新之后添加到JDK 8所以在JDK的这个更新它应该工作但它肯定可能使用具有此功能的JDK上的Java ME SDK。我至少在JDK 1.8.0_192上使用过它。为此我必须对java.security文件进行一些更改。这些chages是:

  • Remove the # on front of jdk.serialFilter 删除jdk.serialFilter前面的#
  • Replace the texto after jdk.serialFilter to * 将jdk.serialFilter替换为*后的texto
  • Romove the # on front of sun.rmi.registry.registryFilter property and of it parametres and remove the whitespaces and / from the same. 在sun.rmi.registry.registryFilter属性及其参数前面移除#,并从中删除空格和/。
  • Do the same on the sun.rmi.transport.dgcFilter property. 在sun.rmi.transport.dgcFilter属性上执行相同的操作。
  • Append ;* at the last parameter of sun.rmi.registry.registryFilter 在sun.rmi.registry.registryFilter的最后一个参数处追加; *

It seems to be importante to not corrupt the parameters because I do this and the emulator wasn't starting. 似乎重要的是不破坏参数,因为我这样做并且模拟器没有启动。

I tried on JDK 11.0.1 and it don't work. 我试过JDK 11.0.1但它不起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM