yccheok / jstock

JStock is a free stock market software for 28 countries.
https://jstock.org
663 stars 347 forks source link

Graphics Device initialization failed for : es2, sw on Ubuntu #83

Open mberrueta opened 7 years ago

mberrueta commented 7 years ago

$ cat /etc/*release

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.10
DISTRIB_CODENAME=yakkety
DISTRIB_DESCRIPTION="Ubuntu 16.10"
....

$ java -version

openjdk version "1.8.0_111"
OpenJDK Runtime Environment (build 1.8.0_111-8u111-b14-2ubuntu0.16.10.2-b14)
OpenJDK 64-Bit Server VM (build 25.111-b14, mixed mode)

running java -jar jstock.jar i get

Graphics Device initialization failed for :  es2, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
        at com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
        at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:221)
        at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:205)
        at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:209)
        at javafx.embed.swing.JFXPanel.initFx(JFXPanel.java:215)
        at javafx.embed.swing.JFXPanel.<init>(JFXPanel.java:230)
        at org.yccheok.jstock.gui.trading.TradingJPanel.<init>(TradingJPanel.java:68)
        at org.yccheok.jstock.gui.JStock.createTradingJPanel(JStock.java:2116)
        at org.yccheok.jstock.gui.JStock.init(JStock.java:122)
        at org.yccheok.jstock.gui.JStock.access$4800(JStock.java:83)
        at org.yccheok.jstock.gui.JStock$41.run(JStock.java:1868)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
        at java.awt.EventQueue.access$500(EventQueue.java:97)
        at java.awt.EventQueue$3.run(EventQueue.java:709)
        at java.awt.EventQueue$3.run(EventQueue.java:703)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
        at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94)
        at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
        at java.lang.Thread.run(Thread.java:745)
Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: No toolkit found
        at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:217)
        at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:209)
        at javafx.embed.swing.JFXPanel.initFx(JFXPanel.java:215)
        at javafx.embed.swing.JFXPanel.<init>(JFXPanel.java:230)
        at org.yccheok.jstock.gui.trading.TradingJPanel.<init>(TradingJPanel.java:68)
        at org.yccheok.jstock.gui.JStock.createTradingJPanel(JStock.java:2116)
        at org.yccheok.jstock.gui.JStock.init(JStock.java:122)
        at org.yccheok.jstock.gui.JStock.access$4800(JStock.java:83)
        at org.yccheok.jstock.gui.JStock$41.run(JStock.java:1868)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
        at java.awt.EventQueue.access$500(EventQueue.java:97)
        at java.awt.EventQueue$3.run(EventQueue.java:709)
        at java.awt.EventQueue$3.run(EventQueue.java:703)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
^C%                                                                                          

any solution?

yccheok commented 7 years ago

Please use Java from Oracle, not from Open JDK.

michaelni commented 7 years ago

You can run jstock with openjdk, but it needs openjfx to be installed apt-get install openjfx should fix this (i just run into the same issue and this seems to fix it)

asser commented 7 years ago

@michaelni Thanks, works on Arch Linux too (pacman -S openjfx)