简体   繁体   English

在NetBeans中添加Java ME平台

[英]Adding Java ME platform in NetBeans

I installed NetBeans 7.2.1 with JDK 7 and the plug-in - Java ME SDK 3.2 (it has Wireles Toolkit 2.5.2 inside). 我安装了带有JDK 7的NetBeans 7.2.1和插件 - Java ME SDK 3.2(里面有Wireles Toolkit 2.5.2)。

I try to create new project by clicking File/New Project/Java ME/Mobile Application . 我尝试通过单击File / New Project / Java ME / Mobile Application来创建新项目。 Then I click next . 然后我点击下一步 In next window the message: 在下一个窗口中显示消息:

Every CLDC project needs to have CLDC compatible SDK/platform/emulator assigned to it. 每个CLDC项目都需要分配CLDC兼容的SDK /平台/模拟器。

Pressing Install SDK/Platform/Emulator button opens Platform Installation wizard, which allows you to "add platform". 按“ 安装SDK /平台/仿真器”按钮可打开“平台安装”向导,该向导允许您“添加平台”。

在此输入图像描述

I tried clicking Install SDK/Platform/Emulator button and I tried then indicating the folder, where Java ME 3.2 is installed. 我尝试单击Install SDK / Platform / Emulator按钮,然后我尝试指示安装Java ME 3.2的文件夹。 It can recognize the emulator, but the project cannot be started. 它可以识别模拟器,但无法启动项目。

在此输入图像描述

After the choice, there appear several options. 选择后,会出现几种选择。 How to make in new version? 如何在新版本中制作? Most of the thing in Internet are connected to old version. 互联网上的大多数东西都与旧版本相关联。

Have you tried using this Oracle tutorial online ? 您是否尝试过在线使用此Oracle教程 It's fairly current (September 2012). 这是当前的(2012年9月)。 There's also an even newer one just posted here . 刚刚发布的还有一个更新的版本。

If you install the Java ME SDK that way, you should have the proper Java Platforms there already. 如果以这种方式安装Java ME SDK,那么您应该已经拥有适当的Java平台 It's hard to read your screen capture, but it doesn't look like the proper Java Platforms are there. 很难读取你的屏幕截图,但它看起来不像正确的Java平台。 I would try again, following the steps in the link I provided. 我会再次尝试,按照我提供的链接中的步骤操作。

I just tried it, with NetBeans 7.2.1, and the Java ME SDK 3.2. 我刚刚尝试使用NetBeans 7.2.1和Java ME SDK 3.2。 The version of NetBeans I used was from this download page and was the Java EE version. 我使用的NetBeans版本来自此下载页面 ,是Java EE版本。

One easy thing to miss in the steps below is that on this download page , you need to download both the Java ME SDK and the Java ME SDK Plugin for Netbeans. 一个简单的事情在下面的步骤错过的是,在此下载页面 ,您需要同时下载的Java ME SDK Java ME SDK插件Netbeans的。 Not just the plugin. 不只是插件。 This applies for the installation instructions in either of the two links I posted above. 这适用于我在上面发布的两个链接中的任何一个中的安装说明。 Install the SDK , and not just the plugin. 安装SDK ,而不仅仅是插件。


In case that link later changes/dies, here are the important steps: 如果链接稍后更改/死亡,以下是重要步骤:

How to integrate Java ME SDK 3.2 with NetBeans 如何将Java ME SDK 3.2与NetBeans集成

By SungmoonCho on Sep 25, 2012 由SungmoonCho于2012年9月25日

Many people like to use Java ME SDK with IDEs. 许多人喜欢将Java ME SDK与IDE配合使用。 We provided instructions on how to integrate the SDK with NetBeans through the download page, and also through the release note, however, let me explain it here once again with some screen shots. 我们提供了有关如何通过下载页面集成SDK和NetBeans的说明,以及发布说明,但是,让我在这里再次通过一些屏幕截图进行解释。

  1. Download Java ME SDK and NetBeans plugin from here. 从这里下载Java ME SDK NetBeans插件。

  2. Install Java ME SDK first. 首先安装Java ME SDK。 You will have the emulator and the runtime on your machine. 您将拥有计算机上的模拟器和运行时。 Also please unarchive the NetBeans plugin somewhere. 另外,请在某处取消归档NetBeans插件。

  3. Launch NetBeans. 启动NetBeans。

  4. Go to "Tools" - "Plugins". 转到“工具” - “插件”。

  5. Check out the "Installed" tab. 查看“已安装”选项卡。 Check "Show details". 选中“显示详细信息”。 If you see the previous version of Java ME SDK Tools installed already. 如果您已经安装了以前版本的Java ME SDK Tools。 Check those to uninstall them. 检查那些卸载它们。

  6. Go to "Settings" tab. 转到“设置”标签。

  7. Click "Add", and provide the location of NetBeans plugin. 单击“添加”,然后提供NetBeans插件的位置。 In my case, it is "file:/C:/Users/sungcho/Downloads/nb-me-sdk-plugins-uc/updates.xml". 就我而言,它是“file:/ C:/Users/sungcho/Downloads/nb-me-sdk-plugins-uc/updates.xml”。 Don't forget to add "updates.xml" at the end. 不要忘记在最后添加“updates.xml”。

  8. Click "Okay" 点击“好的”

  9. Click "Available Plugins" tab. 单击“可用插件”选项卡。

  10. If you scroll down, you will see three Java ME SDK Tools. 如果向下滚动,您将看到三个Java ME SDK工具。 Check "Java ME SDK Tools" plugin. 检查“Java ME SDK工具”插件。 Also check others as you desire. 还可以根据需要检查其他人。

  11. Follow the instruction and install them. 按照说明进行安装。

  12. Restart NetBeans 重新启动NetBeans

  13. That is it. 这就对了。 Done. 完成。 Now you will see Oracle Java ME SDK 3.2 in your Java Platform list. 现在,您将在Java Platform列表中看到Oracle Java ME SDK 3.2。

Finally, I configured it. 最后,我配置了它。 I had plug-in without SDK:). 我有插件没有SDK :)。 I uninstalled plug-in. 我卸载了插件。 I installed Java ME SDK 3.2, then I installed plug-in. 我安装了Java ME SDK 3.2,然后我安装了插件。 I installed SDK not in the default path. 我没有在默认路径中安装SDK。 I indicated platform using "Add platform" button. 我用“添加平台”按钮指示平台。 I indicated 2 platforms and now the project can be run in the emulator. 我指出了2个平台,现在项目可以在模拟器中运行。

Here are platforms:): 这是平台:): 在此输入图像描述

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

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