我在启动 IntelliJ IDEA 时遇到问题大号ubuntu 18.04。当我运行 idea.sh 时,控制台中出现以下警告:
(java:3337): dbind-WARNING **: 14:16:37.242: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
然后打开一个 IntelliJ 启动窗口(带有进度条),之后打开一个包含以下文本的窗口:
Start Failed: Internal error. Please report to http://jb.gg/ide/critical-startup-errors
java.lang.RuntimeException: com.intellij.ide.plugins.PluginManager$StartupAbortedException: Fatal error initializing 'com.intellij.ide.ui.LafManager'
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:216)
at com.intellij.idea.IdeaApplication.lambda$initApplication$0(IdeaApplication.java:75)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
at java.desktop/java.awt.EventQueue.access$600(EventQueue.java:97)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:361)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: com.intellij.ide.plugins.PluginManager$StartupAbortedException: Fatal error initializing 'com.intellij.ide.ui.LafManager'
at com.intellij.ide.plugins.PluginManager.handleComponentError(PluginManager.java:257)
at com.intellij.openapi.components.impl.PlatformComponentManagerImpl.handleInitComponentError(PlatformComponentManagerImpl.java:43)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:506)
at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponents(ComponentManagerImpl.java:107)
at com.intellij.openapi.application.impl.ApplicationImpl.lambda$createComponents$9(ApplicationImpl.java:446)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:580)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
at com.intellij.openapi.application.impl.ApplicationImpl.createComponents(ApplicationImpl.java:453)
at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:91)
at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:405)
at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:391)
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:209)
... 16 more
Caused by: java.lang.NoClassDefFoundError: com/sun/java/swing/plaf/windows/WindowsLookAndFeel
at com.intellij.ide.ui.laf.IdeaLaf.initIdeaDefaults(IdeaLaf.java:81)
at com.intellij.ide.ui.laf.IdeaLaf.initComponentDefaults(IdeaLaf.java:28)
at java.desktop/javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:150)
at java.desktop/javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:1560)
at com.intellij.ide.ui.laf.darcula.DarculaLaf.getDefaults(DarculaLaf.java:95)
at java.desktop/javax.swing.UIManager.setLookAndFeel(UIManager.java:587)
at com.intellij.ide.ui.laf.LafManagerImpl.setCurrentLookAndFeel(LafManagerImpl.java:395)
at com.intellij.ide.ui.laf.LafManagerImpl.initComponent(LafManagerImpl.java:191)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:488)
... 28 more
Caused by: java.lang.ClassNotFoundException: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
at com.intellij.util.lang.UrlClassLoader.findClass(UrlClassLoader.java:224)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:566)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
... 37 more
我已经向该网址报告了该问题,但没有得到答复(至少目前没有)。我该怎么办?提前谢谢您。
更新:在研究这个问题时,我偶然发现了这个帖子,描述了类似的问题。那里的人建议使用 IDEA 捆绑的 JRE,而不是其他版本。但现在我遇到了一个不同的问题 - 我不知道如何更改它。我读过指令,但它说我需要编辑文件/home/<username>/.<product>/<product>.jdk
。我没有这样的文件和这样的目录。说明还建议编辑/bin/idea.sh
,但我不知道那里到底要编辑什么。我应该编辑什么?
答案1
好的,我通过安装 Oracle 的 Java 8 并将其设置为默认值解决了该问题。之前我使用的是 OpenJDK Java 11。