Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » Running eclipse.exe (octopus.exe) after maven tycho build does not start-up
Running eclipse.exe (octopus.exe) after maven tycho build does not start-up [message #1818697] Mon, 23 December 2019 18:11 Go to next message
Herbert Greilberger is currently offline Herbert GreilbergerFriend
Messages: 2
Registered: December 2019
Junior Member
The following tooling SW versions are used for my product (named octopus):
Java 13
JavaFX 13
Eclipse 2019-09
maven 3.6.3
tycho 1.5.1

I am developing an e(fx)clipse E4 RCP application featuring a test automation framework. I am using the recommended eclipse tycho folder structure and running the product with Eclipse IDE works fine. However, after successful maven-tycho build, running the application (octopus.exe) fails with the following exception:
Exception in Application start method
java.lang.RuntimeException: Exception in Application start method
        at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:900)
        at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
        at java.base/java.lang.Thread.run(Thread.java:830)
Caused by: java.lang.IllegalAccessError: class org.eclipse.fx.ui.workbench.fx.services.InteractiveStartupService (in unnamed module @0x331144b3) cannot access class com.sun.javafx.tk.Toolkit (in module javafx.graphics) because module javafx.graphics does not export com.sun.javafx.tk to unnamed module @0x331144b3
        at org.eclipse.fx.ui.workbench.fx.services.InteractiveStartupService.show(InteractiveStartupService.java:61)
        at org.octopus.ui.application.OctopusStartupProgressTracker.stateReached(OctopusStartupProgressTracker.java:45)
        at org.eclipse.fx.ui.workbench.fx.E4Application.updateStartupState(E4Application.java:447)
        at org.eclipse.fx.ui.workbench.fx.E4Application.jfxStart(E4Application.java:226)
        at org.eclipse.fx.ui.workbench.fx.DefaultJFXApp.start(DefaultJFXApp.java:60)
        at org.eclipse.fx.ui.workbench.fx.E4MainThreadApplication$ExtendedE4Application.start(E4MainThreadApplication.java:101)
        at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
        at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
        at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
        at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
        at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
        at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
        at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
        ... 1 more

The exception shows that the unnamed bundle (my octopus application bundle) cannot access type 'com.sun.javafx.tk.Tooljit' because
the module javafx.graphics does not export package 'com.sun.javafx.tk' to the unnamed bundle.
How can this restriction be resolved? How can the 'com.sun.javafx.tk' javafx package get exported to my unamed bundle? I tried to fix it
with all kinds of '--add-exports' '--add-reads' and '--add-modules' vmargs in the octopus.ini, however, without success.
It looks like that these arguments are ignored by the native e(fx)clipse launcher.

I use the type Toolkit in order to synchronize my splash screen and turn it into a startup-dialog. By means of the StartupProgressTrackerService
the splash is hidden and replaced by the startup-dialog.

See uploaded files for parent pom.xml, product.xml, target.xml, generated octopus.ini and config.in.

I am looking for a solution for days . I would appriciate it very much when somebody could help.
Re: Running eclipse.exe (octopus.exe) after maven tycho build does not start-up [message #1819191 is a reply to message #1818697] Thu, 09 January 2020 17:48 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6520
Registered: July 2009
Senior Member
So how do you ship JavaFX? Did you create a custom JDK with jlink?
Re: Running eclipse.exe (octopus.exe) after maven tycho build does not start-up [message #1819617 is a reply to message #1819191] Sat, 18 January 2020 14:56 Go to previous message
Herbert Greilberger is currently offline Herbert GreilbergerFriend
Messages: 2
Registered: December 2019
Junior Member
Thank you Tom for the reply!

No, i did not create a custum JDK with jlink. Actually, i dont know how to create a custom JDK with jlink.

Besides Java, I simply installed JavaFX under C:\Program Files\JavaFX\javafx-sdk-13.0.1. I thought i can post/ship the JavaFX API via the --module-path "C:\Program Files\JavaFX\javafx-sdk-13.0.1\lib" option (and other java module options) in octopus.ini at octopus application startup..

Do i have to define a certain environment variable (like JAVAFX_HOME)?
Or, is a custom JDK with jlink (i guess a jlink to the JavaFX API) the only way to solve my problem?

Another question: What are the javafx <extraClasspathElement>s in the 'tycho-compiler-plugin' used for? I guess, they are just required to get the product compiler-clean.

Thanks again!
Previous Topic:Java11 e4 application openjfx
Next Topic:Default e4 application project has errors
Goto Forum:
  


Current Time: Mon Jan 27 09:54:06 GMT 2020

Powered by FUDForum. Page generated in 0.02163 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top