在 netbeans 8.0 中添加 Java ME 平台
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24346193/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Adding Java ME platform in netbeans 8.0
提问by user2468097
I am having trouble installing the ME platform for Netbeans 8.0 - I have:
我在为 Netbeans 8.0 安装 ME 平台时遇到问题 - 我有:
Installed Netbeans IDE 8.0
Installed jmesdk-3.4
Installed the jmesdk-3.4 plugin & activated it in Netbeans
安装 Netbeans IDE 8.0
安装 jmesdk-3.4
安装 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. Please add at least one
未找到 Java ME 平台。请至少添加一个
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. need help please.
当我尝试通过定位 jmesdk-3.4 文件夹来添加 java 平台时,它告诉我没有自动检测到平台(失败),它需要我手动添加。但手动添加只会造成更多混乱。需要帮助请。
回答by moskito-x
How to install JAVA ME SDK 3.4
如何安装 JAVA ME SDK 3.4
- Go to the Java ME SDK Download page javame-sdk/downloads/index.html.
- 转至 Java ME SDK 下载页面javame-sdk/downloads/index.html。
- 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.
- Double-click the installer file to run the installer, and follow the instructions.
- Remember the installations directory. e.g. -> U:\Java_ME_platform_SDK_3.4
- 单击接受许可协议选项。
- 创建帐户或登录
- 下载 Java ME SDK 安装程序文件并将其保存到您计算机上的任何位置。
- 双击安装程序文件以运行安装程序,然后按照说明进行操作。
- 记住安装目录。例如 -> 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
e.g.oracle-jmesdk-3-4-rr-nb-plugins
- 将下载的解压
oracle-jmesdk-3-4-rr-nb-plugins.zip
到一个文件夹中,
例如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.
- In the Plugins dialog box, click the Installed tab and select Java ME in the list of available features.
- 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.
- 从主 IDE 的工具栏中选择工具 > 插件。
- 在插件对话框中,单击已安装选项卡并在可用功能列表中选择 Java ME。
- 单击激活。
- 在安装程序对话框的欢迎面板中,单击激活。
- 激活成功完成后,单击完成。
- 单击关闭以关闭插件对话框。
How to register Java ME SDK as a platform in NetBeans IDE?
如何在 NetBeans IDE 中将 Java ME SDK 注册为平台?
- Choose Tools > Java Platforms in the IDE.
- In the Java Platform Manager dialog box, click Add Platforms.
- In the Add Java Platform dialog box, select Java ME CLDC Platform Emulator and click Next.
- Select the folder where Java ME SDK is installed in the Choose directory to search for platforms dialog box and click Open.
- Ensure the Java ME SDK platform is chosen in the Add Java Platform dialog box and click Next.
- After the IDE detects the platform, click Finish. Java ME SDK should now be registered in the IDE.
- In the Java Platform Manager dialog box, click Close.
- 在 IDE 中选择工具 > Java 平台。
- 在 Java 平台管理器对话框中,单击添加平台。
- 在 Add Java Platform 对话框中,选择 Java ME CLDC Platform Emulator 并单击 Next。
- 在“选择目录搜索平台”对话框中选择Java ME SDK安装文件夹,单击“打开”。
- 确保在“添加 Java 平台”对话框中选择了 Java ME SDK 平台,然后单击“下一步”。
- IDE 检测到平台后,单击“完成”。现在应该在 IDE 中注册 Java ME SDK。
- 在 Java 平台管理器对话框中,单击关闭。
How to install the downloaded plugin
如何安装下载的插件
- Go to Tools -- Plugins -- Downloaded
- Click Add Plugins
- Navigate to the Plugin folder e.g.
oracle-jmesdk-3-4-rr-nb-plugins
- 转到工具--插件--已下载
- 点击添加插件
- 导航到插件文件夹,例如
oracle-jmesdk-3-4-rr-nb-plugins
- Select all .nbm
- 选择所有 .nbm
- Restart Netbeans
- 重新启动 Netbeans
enjoy the new program examples
享受新的程序示例
Done
完毕
回答by Patricia Thaine
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). Currently using a Windows 10 64-bit system. Note that I did not accept any updates for the required Java ME plugins, as I hear that might make things crash.
我做了其他答案建议的操作,但仅在将 Netbeans IDE 7.4 和 JDK 1.7 用于 32 位系统时才有效(https://www.oracle.com/technetwork/java/javase/downloads/java-archive-下载-javase7-521261.html)。目前使用的是 Windows 10 64 位系统。请注意,我不接受所需 Java ME 插件的任何更新,因为我听说这可能会使事情崩溃。
回答by Ant?nio Diego Silva
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 文件进行一些更改。更改是:
- Remove the # on front of jdk.serialFilter
- Replace the texto after jdk.serialFilter to *
- Romove the # on front of sun.rmi.registry.registryFilter property and of it parametres and remove the whitespaces and / from the same.
- Do the same on the sun.rmi.transport.dgcFilter property.
- Append ;* at the last parameter of sun.rmi.registry.registryFilter
- 删除 jdk.serialFilter 前面的#
- 将 jdk.serialFilter 后的 texto 替换为 *
- 删除 sun.rmi.registry.registryFilter 属性前面的 # 及其参数,并从中删除空格和/。
- 对 sun.rmi.transport.dgcFilter 属性执行相同的操作。
- 在 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 上尝试过,但它不起作用。