3

Below is what I'm using,

  • OS: macOS Big Sur
  • NetBeans: 12.5
  • Java: 7 / 8 / 17

I'm trying to install Java Me pluginenter image description here

Upon installation, i kept getting thisenter image description here

I have tried using java 7, 8 and 17 (I'm using jenv to control java version).. Nothing works.. Could anyone please help?

EDIT: Below is the log i get when i trying to install (using jdk17, I also checked the firewall is off)

java.io.FileNotFoundException: /Applications/NetBeans/Apache NetBeans 12.5.app/Contents/Resources/NetBeans/netbeans/mobility/modules/locale/org-netbeans-modules-mobility-jsr172_ja.jar (No such file or directory)
    at java.base/java.io.FileInputStream.open0(Native Method)
    at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
    at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
    at org.netbeans.updater.UpdateTracking.getFileCRC(UpdateTracking.java:507)
[catch] at org.netbeans.updater.ModuleUpdater.unpack(ModuleUpdater.java:469)
    at org.netbeans.updater.ModuleUpdater.run(ModuleUpdater.java:117)
INFO [org.netbeans.updater]: File /Applications/NetBeans/Apache NetBeans 12.5.app/Contents/Resources/NetBeans/netbeans/mobility/update/download/org-netbeans-modules-mobility-jsr172.nbm deleted.
INFO [org.netbeans.updater]: Use XML Transformer: com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl@afcc1b6
INFO [org.netbeans.updater]: File /Applications/NetBeans/Apache NetBeans 12.5.app/Contents/Resources/NetBeans/netbeans/mobility/update_tracking/org-netbeans-modules-mobility-jsr172.xml modified.
INFO [org.netbeans.updater]: File installed /Applications/NetBeans/Apache NetBeans 12.5.app/Contents/Resources/NetBeans/netbeans/mobility/update_tracking/org-netbeans-modules-mobility-jsr172.xml@1,637,575,673,151
INFO [org.netbeans.updater]: File /Users/awesomeee/Library/Application Support/NetBeans/12.5/config/Modules/org-netbeans-modules-mobility-jsr172.xml_hidden deleted.
INFO [org.netbeans.updater]: File /Applications/NetBeans/Apache NetBeans 12.5.app/Contents/Resources/NetBeans/netbeans/mobility/update/download/additional_information.xml deleted.
INFO [org.netbeans.core.startup.NbEvents]: Warning: the module /modules/org-netbeans-modules-mobility-licensing.jar could not be found, ignoring...
INFO [org.netbeans.core.startup.NbEvents]: Warning: the module /modules/org-netbeans-modules-j2me-common-ant.jar could not be found, ignoring...
INFO [org.netbeans.core.startup.NbEvents]: Warning: the module /modules/org-netbeans-api-mobility.jar could not be found, ignoring...
INFO [org.netbeans.core.startup.NbEvents]: Warning: the module /modules/org-netbeans-modules-mobility-jsr172.jar could not be found, ignoring...
INFO [org.netbeans.core.startup.NbEvents]: Warning: the module /modules/org-netbeans-modules-mobility-end2end.jar could not be found, ignoring...
INFO [org.netbeans.core.startup.NbEvents]: Warning: the module /modules/org-netbeans-modules-j2me-kit.jar could not be found, ignoring...
INFO [org.netbeans.core.startup.NbEvents]: Warning: the module /modules/org-netbeans-modules-j2me-project.jar could not be found, ignoring...
INFO [org.netbeans.core.startup.NbEvents]: Warning: the module /modules/org-netbeans-modules-mobility-databindingme.jar could not be found, ignoring...
INFO [org.netbeans.core.startup.NbEvents]: Warning: the module /modules/org-netbeans-modules-mobility-cldcplatform.jar could not be found, ignoring...
INFO [org.netbeans.modules.autoupdate.services.InstallSupportImpl]: Timeout waiting for loading module org.netbeans.modules.mobility.jsr172@1.31.1
INFO [org.netbeans.modules.autoupdate.ui.wizards.InstallStep]: timeout of loading Java ME Web Service Clients (JSR 172)[org.netbeans.modules.mobility.jsr172/1.31.1]
org.netbeans.api.autoupdate.OperationException[INSTALL]: timeout of loading Java ME Web Service Clients (JSR 172)[org.netbeans.modules.mobility.jsr172/1.31.1]
    at org.netbeans.modules.autoupdate.services.InstallSupportImpl$3.call(InstallSupportImpl.java:431)
    at org.netbeans.modules.autoupdate.services.InstallSupportImpl$3.call(InstallSupportImpl.java:291)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[catch] at java.base/java.lang.Thread.run(Thread.java:833)
skomisa
  • 16,436
  • 7
  • 61
  • 102
ramen87x
  • 160
  • 3
  • 18
  • See the accepted answer for [Installing J2ME plugins in NetBeans 12.4](https://stackoverflow.com/q/68243748/2985643). Although that answer was written for NetBeans 12.4 and the problem in the question is not identical to yours, I've just verified that the accepted answer remains valid for NetBeans 12.5. Therefore I'm voting to close your question as a duplicate, but if that solution doesn't work for you then: [1] Update your question to detail why that solution did not work for you. [2] Reply to this comment once the question has been updated and I will post an answer specific to 12.5 here. – skomisa Nov 19 '21 at 07:35
  • Does this answer your question? [Installing J2ME plugins in NetBeans 12.4](https://stackoverflow.com/questions/68243748/installing-j2me-plugins-in-netbeans-12-4) – skomisa Nov 19 '21 at 07:40
  • Also, please update your question to specify the URL that was used to download the ME plugins. The one that just worked for me was `http://updates.netbeans.org/netbeans/updates/8.2/uc/final/distribution/catalog.xml.gz` – skomisa Nov 19 '21 at 07:43
  • Unfortunately, that is the post that i followed but I still isn't able to install Java Me.. – ramen87x Nov 22 '21 at 02:57
  • [1] OK. Since it worked for me two days ago, and it looks like you are doing everything correctly, I'm wondering if there was a transient network problem, or there is an environment issue on your side such as a firewall. Perhaps just try again to see if it works? If not update your question with any relevant messages from the NetBeans log (**View > IDE Log**) after the timeout. [2] Not sure why you are using Java 7 at all, but I don't think NetBeans has supported it since version 8.2. [3] FYI, I am running NetBeans 12.5 with JDK 17 as the default platform, but JDK 8 should work just as well. – skomisa Nov 22 '21 at 07:07
  • I see, i'll try with jdk17, finger crossed – ramen87x Nov 22 '21 at 10:04
  • Hi @skomisa , i updated my post, please check, btw, thanks for replying! – ramen87x Nov 22 '21 at 10:15
  • I think you are missing the **unpack200** jar which was removed in JDK 14. This is required for unpacking the downloaded plugins. During my ME install using JDK 17 there was a button labeled something like _"Choose unpack200.exe"_, and perhaps you didn't click that? Anyway, the easiest resolution is to temporarily set your default platform to JDK 8, reinstall the ME plugins, then revert to JDK 17 as your default platform. [See this SO answer for more details](https://stackoverflow.com/a/68043338/2985643). That answer relates to C++ plugins rather than ME plugins, but is still valid for you. – skomisa Nov 22 '21 at 11:02
  • Also: [1] I retracted my close vote for your question. [2] If you are still stuck I'll post an answer with screenshots. [3] See the comments to the linked answer for more details on _unpack200.exe_. – skomisa Nov 22 '21 at 11:03
  • Yes, it works! I had successfully install all 4 Java Me plugin, thank you! Mind posting your solution? So that i can accept it – ramen87x Nov 22 '21 at 11:28

1 Answers1

2

The OP's error message "The plugin install found problem timeout of loading Java ME Web Service Clients" is misleading, since it suggests that there may be a network issue. However, the FileNotFoundException in the NetBeans log file shows that the real cause is that the plugin installer is failing because it can't locate the file unpack200.exe to unpack the downloaded plugins.

This issue arises if NetBeans is running on JDK 14 or greater, since unpack200.exe was removed in that release. See JEP 367: Remove the Pack200 Tools and API for details.

A workaround in the past has been to temporarily run NetBeans with an earlier JDK which contained unpack200.exe, typically JDK 8 or JDK 11. Then, once the plugins had been successfully installed, just revert to using your JDK >= 14. That approach is documented in great detail here. Most of the individual steps in that answer remain valid, but there is no longer any need to revert to running NetBeans on a JDK < 14 because there is a simpler approach available.

When running NetBeans 12.5 on a JDK >= 14, the plugin installer now detects that unpack200.exe is missing after downloading the plugins, and invites you to provide an instance of it:

chooseunpack200

Clicking the Choose Unpack200... button in the lower left of that screen opens the following dialog:

selectFile

Navigate to any instance of unpack200.exe on your machine. It will reside in the bin directory for any JDK release < 14. Once the plugin installer has located an instance of unpack200.exe it can convert the downloaded plugins into jar files to complete the plugin installation process.

Notes:

  • Although this question is about the Java ME plugins, the same approach applies when running NetBeans on a JDK >= 14, and installing any plugin that uses the Pack200/Unpack200 APIs.

  • NetBeans asking for a location of unpack200.exe only happens once. Thereafter it uses the location you provided initially by default.

skomisa
  • 16,436
  • 7
  • 61
  • 102