使用 synaptics 在 Ubuntu 18.04 中安裝 eclipse 後,應用程式無法啟動,顯示錯誤

使用 synaptics 在 Ubuntu 18.04 中安裝 eclipse 後,應用程式無法啟動,顯示錯誤

我使用的是 Ubuntu 18.04。我使用 synaptics 來安裝 eclipse。在那裡,我選擇了由突觸標記的預設 Eclipse 和預設依賴項,應用它們,然後關閉突觸。

現在,當我按下鍵盤上的 window 鍵並在搜尋欄中輸入 eclipse 時,會出現 eclipse 圖示。單擊該圖標後,Eclipse 應用程式無法啟動。相反,我得到一個彈出式選單,上面寫著

發生了錯誤。看日誌文件 /home/username/.eclipse/org.eclipse.platform_3.8_155965261/configuration/1528986311505.log

另外,如果我嘗試從終端打開 Eclipse,也會發生同樣的事情

命令

java -version

給出結果

openjdk version "10.0.1" 2018-04-17
OpenJDK Runtime Environment (build 10.0.1+10-Ubuntu-3ubuntu1)
OpenJDK 64-Bit Server VM (build 10.0.1+10-Ubuntu-3ubuntu1, mixed mode)

日誌檔的內容是:

!SESSION Thu Jun 14 19:55:11 IST 2018
------------------------------------------ !ENTRY org.eclipse.equinox.launcher 4 0 2018-06-14 19:55:11.579 !MESSAGE Exception launching the Eclipse Platform: !STACK java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:566)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:626)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1414)

那麼如何解決這個問題呢?

答案1

Ubuntu 18.04(和18.04.1)中的eclipse版本已損壞。

幾乎沒有人使用ubuntu提供的eclipse版本。您應該遵循以下步驟:https://doc.ubuntu-fr.org/eclipse#installation_par_le_nouvel_outil_eclipse_installer並安裝更新的版本。

相關內容