Netbeans 12.5无法安装Java ME插件。

3
以下是我正在使用的内容,
  • 操作系统:macOS Big Sur
  • NetBeans:12.5
  • Java:7 / 8 / 17
我正在尝试安装Java Me插件enter image description here 安装时,我一直收到这个错误enter image description here 我已经尝试使用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)


请查看在NetBeans 12.4中安装J2ME插件的被接受的答案。尽管该答案是为NetBeans 12.4编写的,而问题与您的不完全相同,但我刚刚验证了接受的答案仍适用于NetBeans 12.5。因此,我将投票关闭您的问题作为重复问题,但如果该解决方案对您无效,则:[1]更新您的问题以详细说明该解决方案为何不能解决您的问题。[2]更新问题后回复此评论,我将在此处发布一个特定于12.5的答案。 - skomisa
这个回答解决了你的问题吗?在NetBeans 12.4中安装J2ME插件 - skomisa
另外,请更新您的问题,以指定用于下载ME插件的URL。对我有效的是http://updates.netbeans.org/netbeans/updates/8.2/uc/final/distribution/catalog.xml.gz - skomisa
不幸的是,那是我遵循的帖子,但我仍然无法安装Java Me。 - ramen87x
嗨 @skomisa,我更新了我的帖子,请查看,顺便感谢您的回复! - ramen87x
显示剩余5条评论
1个回答

2
OP的错误信息“插件安装发现Java ME Web Service Clients加载超时问题”是误导性的,因为它暗示可能存在网络问题。然而,在NetBeans日志文件中的FileNotFoundException显示真正的原因是插件安装程序失败了,因为它无法找到unpack200.exe文件来解压下载的插件。
如果NetBeans在JDK 14或更高版本上运行,则会出现此问题,因为在该版本中删除了unpack200.exe。有关详细信息,请参见JEP 367:删除Pack200工具和API。
过去的解决方法是临时使用早期包含unpack200.exe的JDK(通常是JDK 8或JDK 11)运行NetBeans。然后,一旦成功安装了插件,就可以恢复使用JDK >= 14。这种方法在这里有详细记录。该答案中的大多数步骤仍然有效,但不再需要回到在JDK <14上运行NetBeans,因为现在有更简单的方法可用。
在使用 JDK >= 14 运行 NetBeans 12.5 时,插件安装程序现在会在下载插件后检测到缺少 unpack200.exe,并邀请您提供其实例。

chooseunpack200

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

selectFile

在您的机器上导航到任何一个unpack200.exe实例。对于任何JDK版本小于14,它将驻留在bin目录中。一旦插件安装程序找到了一个unpack200.exe实例,它就可以将已下载的插件转换为jar文件,以完成插件安装过程。
注意事项:
  • 虽然这个问题是关于Java ME插件的,但当在JDK >= 14上运行NetBeans并安装使用Pack200/Unpack200 API的任何插件时,同样的方法也适用。

  • NetBeans只会在第一次询问unpack200.exe的位置。此后,它默认使用您最初提供的位置。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接