繁体   English   中英

Netbeans 12.5 无法安装 Java ME插件

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

下面是我正在使用的,

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

我正在尝试安装 Java Me 插件在此处输入图像描述

安装后,我一直得到这个在此处输入图像描述

我尝试过使用 java 7、8 和 17(我正在使用 jenv 来控制 java 版本)..没有任何效果..有人可以帮忙吗?

编辑:下面是我尝试安装时得到的日志(使用 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)

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

如果 NetBeans 在 JDK 14 或更高版本上运行,则会出现此问题,因为在该版本中删除了unpack200.exe 有关详细信息,请参阅JEP 367:删除 Pack200 工具和 API

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

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

选择unpack200

单击该屏幕左下方的选择 Unpack200...按钮将打开以下对话框:

选择文件

导航到您计算机上的任何unpack200.exe实例。 它将驻留在任何 JDK 版本 < 14 的bin目录中。一旦插件安装程序找到了unpack200.exe的实例,它就可以将下载的插件转换为 jar 文件以完成插件安装过程。

笔记:

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

  • NetBeans 要求unpack200.exe的位置只发生一次。 此后,它默认使用您最初提供的位置。

暂无
暂无

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

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