java.lang.ExceptionInInitializerError at javafx.scene.web.WebEngine.<clinit>(WebEngine.java:3 [message #1836432] |
Mon, 04 January 2021 04:47  |
Eclipse User |
|
|
|
Hello,
First of all Happy new Year :)
I am using javaFx in an Eclipse plugin already using swt.
My update site (manually built) works fine, however in the RCP built by maven I have this error
java.lang.ExceptionInInitializerError
at javafx.scene.web.WebEngine.<clinit>(WebEngine.java:317)
at javafx.scene.web.WebView.<init>(WebView.java:273)
at org.eclipse.papyrus.gamification.view.MainView.createFxScene(MainView.java:57)
at org.eclipse.fx.ui.workbench3.FXViewPart.createPartControl(FXViewPart.java:29)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:154)....
Caused by: java.lang.RuntimeException: Internal graphics not initialized yet
at com.sun.glass.ui.Screen.getScreens(Screen.java:70)
at com.sun.javafx.webkit.prism.PrismGraphicsManager.<clinit>(PrismGraphicsManager.java:47)
Here is the line that raise the execption :
public class MainView extends FXViewPart {
private WebView browser;
private ViewManager viewManager;
/**
* @see org.eclipse.fx.ui.workbench3.FXViewPart#createFxScene()
*
* @return
*/
@Override
protected Scene createFxScene() {
browser = new WebView();
...
}
Any Idea how to solve this issue ?
I am using java8 with this version of efx 3.6.0.201907240103 org.eclipse.fx.ui.workbench3
I followed this example to build my RCP product https://github.com/fipro78/e4-cookbook-basic-recipe and I already added jfxswt jar file to the pluginmanagment in my root pom
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<encoding>UTF-8</encoding>
<extraClasspathElements>
<extraClasspathElement>
<groupId>com.oracle</groupId>
<artifactId>javafx</artifactId>
<version>8.0.0-SNAPSHOT</version>
<systemPath>C:/Program Files/Java/jre1.8.0_271/jre/lib/jfxswt.jar</systemPath>
<scope>system</scope>
</extraClasspathElement>
</extraClasspathElements>
</configuration>
</plugin>
Thank you very much.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03408 seconds