简体   繁体   中英

Netbeans - Automatic Java ME SDK platform addition failing

I am trying to setup Java ME SDK 8.3 with Netbeans 8.2. I followed the following install order:

  • Java SE Development Kit 8u152
  • Java ME SDK 8.3
  • Netbeans 8.2

Then I try to add Java ME SDK 8.3 to Java Platforms

Tools --> Java Platforms --> Java ME CLDC Platform Emulator --> Choose Java ME SDK Directory, then automatic detection fails.

选择 Java ME SDK 文件夹

添加 Java ME SDK

自动检测 Java ME SDK 失败

I have tried re-installing Java ME SDK and Netbeans. But it didn't help. How to solve this?

The problem is that SDK 8.3 isn't CLDC but rather CDC. A lot of people are confused by this, which is understandable. I have no clue why Oracle thought it was a good idea to keep the name "JavaME SDK" but leave out MIDP and CLDC starting from version 8.

What you need to download is Java ME SDK 3.4 (or the latest v3.x). This is the last Java ME SDK that contains CLDC API's.

I was facing the same error. Installing Sun Java Wireless Toolkit worked for me.

Link: http://www.oracle.com/technetwork/java/index-jsp-137162.html

You can manually add the path for your Java SDK in the netbeans.conf file.

Right-click on your desktop and click properties and open location:

  1. Open Dir C:\Program Files\NetBeans-15\netbeans\etc
  2. Open File netbeans.conf

goto

 # Default location of JDK:
 # (set by installer or commented out if launcher should decide)
 #
 # It can be overridden on command line by using --jdkhome <dir>
 # Be careful when changing jdkhome.
 # There are two NetBeans launchers for Windows (32-bit and 64-bit) and
 # installer points to one of those in the NetBeans application shortcut 
 # based on the Java version selected at installation time.

netbeans_jdkhome="PATH TO YOUR SDK"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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