简体   繁体   English

Netbeans 12.5 无法安装 Java ME插件

[英]Netbeans 12.5 can't install Java ME plugin

Below is what I'm using,下面是我正在使用的,

  • OS: macOS Big Sur操作系统:macOS 大苏尔
  • NetBeans: 12.5 NetBeans:12.5
  • Java: 7 / 8 / 17 Java:7 / 8 / 17

I'm trying to install Java Me plugin我正在尝试安装 Java Me 插件在此处输入图像描述

Upon installation, i kept getting this安装后,我一直得到这个在此处输入图像描述

I have tried using java 7, 8 and 17 (I'm using jenv to control java version).. Nothing works.. Could anyone please help?我尝试过使用 java 7、8 和 17(我正在使用 jenv 来控制 java 版本)..没有任何效果..有人可以帮忙吗?

EDIT: Below is the log i get when i trying to install (using jdk17, I also checked the firewall is off)编辑:下面是我尝试安装时得到的日志(使用 jdk17,我还检查了防火墙是否关闭)

 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)

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. OP 的错误消息“插件安装发现加载 Java ME Web 服务客户端的问题超时”具有误导性,因为它表明可能存在网络问题。 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.但是,NetBeans 日志文件中的FileNotFoundException显示,真正的原因是插件安装程序失败,因为它找不到文件unpack200.exe来解压下载的插件。

This issue arises if NetBeans is running on JDK 14 or greater, since unpack200.exe was removed in that release.如果 NetBeans 在 JDK 14 或更高版本上运行,则会出现此问题,因为在该版本中删除了unpack200.exe See JEP 367: Remove the Pack200 Tools and API for details.有关详细信息,请参阅JEP 367:删除 Pack200 工具和 API

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 .过去的解决方法是使用包含 unpack200.exe 的早期 JDK 临时运行NetBeans ,通常是 JDK 8 或 JDK 11。然后,一旦成功安装插件,只需恢复使用 JDK >= 14。这种方法在这里详细记录 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.该答案中的大多数单独步骤仍然有效,但不再需要在 JDK < 14 上恢复运行 NetBeans,因为有一种更简单的方法可用。

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:在 JDK >= 14 上运行 NetBeans 12.5 时,插件安装程序现在会在下载插件后检测到unpack200.exe丢失,并邀请您提供它的实例:

选择unpack200

Clicking the Choose Unpack200... button in the lower left of that screen opens the following dialog:单击该屏幕左下方的选择 Unpack200...按钮将打开以下对话框:

选择文件

Navigate to any instance of unpack200.exe on your machine.导航到您计算机上的任何unpack200.exe实例。 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.它将驻留在任何 JDK 版本 < 14 的bin目录中。一旦插件安装程序找到了unpack200.exe的实例,它就可以将下载的插件转换为 jar 文件以完成插件安装过程。

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.虽然这个问题是关于 Java ME 插件,但同样的方法适用于在 JDK >= 14 上运行 NetBeans 并安装任何使用 Pack200/Unpack200 API 的插件。

  • NetBeans asking for a location of unpack200.exe only happens once. NetBeans 要求unpack200.exe的位置只发生一次。 Thereafter it uses the location you provided initially by default.此后,它默认使用您最初提供的位置。

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

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