簡體   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