数据库
首页 > 数据库> > java – 为什么Oracle SQL Developer在Mac OS上启动时会出现空指针异常

java – 为什么Oracle SQL Developer在Mac OS上启动时会出现空指针异常

作者:互联网

当我启动全新安装的Oracle SQL Developer时,图标在Dock中反弹一点然后消失.

当我通过CLI启动它时,我收到此错误:

Oracle SQL Developer
 Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.

java.lang.IllegalStateException: Problem creating splash screen on ETD.
    at oracle.ide.osgi.boot.SplashScreenImpl.SynchronizeWithEdt(SplashScreenImpl.java:541)
    at oracle.ide.osgi.boot.api.SplashScreen.createInstance(SplashScreen.java:66)
    at oracle.ide.osgi.boot.OracleIdeLauncher.showSplashScreen(OracleIdeLauncher.java:828)
    at oracle.ide.osgi.boot.OracleIdeLauncher.main(OracleIdeLauncher.java:109)
Caused by: java.lang.reflect.InvocationTargetException
    at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1328)
    at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1303)
    at java.desktop/javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1475)
    at oracle.ide.osgi.boot.SplashScreenImpl.SynchronizeWithEdt(SplashScreenImpl.java:537)
    ... 3 more
Caused by: java.lang.NullPointerException
    at java.desktop/java.awt.Window.init(Window.java:495)
    at java.desktop/java.awt.Window.<init>(Window.java:535)
    at java.desktop/java.awt.Frame.<init>(Frame.java:423)
    at java.desktop/java.awt.Frame.<init>(Frame.java:388)
    at java.desktop/javax.swing.JFrame.<init>(JFrame.java:180)
    at oracle.ide.osgi.boot.OracleIdeLauncher$2.getHiddenWindow(OracleIdeLauncher.java:807)
    at oracle.ide.osgi.boot.api.SplashScreen$1.run(SplashScreen.java:61)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:303)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
    at java.desktop/java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:717)
    at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:711)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:89)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:199)
    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)
A fatal error in the IDE boostraping code. Exiting ...

我试图验证JDK版本是否正确,并且没有其他缺少的依赖项.导致此错误的原因是什么?

编辑:

目前通过Dell D6000基座通过minidisplay端口连接,使用DisplayLink驱动程序

MacBook Pro(15英寸,2017年),High Sierra v10.13.3,DisplayLinkDriver v4.0.0(85514)

$java -version
java version "9.0.4"
Java(TM) SE Runtime Environment (build 9.0.4+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)

解决方法:

拔出头发后,一位同事发现了原因:我正在使用多台显示器.

事实证明,启动画面试图在主显示器上显示但由于某种原因无法显示.断开我的额外显示解决了问题并允许我启动应用程序.启动后,我插入显示器并将窗口拖到它们上面,没问题.

TLDR:将主显示器设置为Macbook屏幕或使用一台显示器启动

您可以使用聚光灯搜索显示来更改主监视器,然后将白色条拖动到实际的计算机显示屏(在我的情况下是macbook屏幕).

标签:java,oracle,oracle-sqldeveloper
来源: https://codeday.me/bug/20190622/1262678.html