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: 4
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: 6651
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 messageGo to next message
Herbert Greilberger is currently offline Herbert GreilbergerFriend
Messages: 4
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!
Re: Running eclipse.exe (octopus.exe) after maven tycho build does not start-up [message #1821420 is a reply to message #1819617] Wed, 12 February 2020 19:27 Go to previous messageGo to next message
Michael Marton is currently offline Michael MartonFriend
Messages: 7
Registered: August 2015
Junior Member
We are actually migrating our e(fx)clipse application to openJDK11 & openJFX11. Ran into several similar issues. Please see the attached files (I renamed them to eclipse_man.ini and eclipse_org.ini, resp) which work for us (openJDK11 is located under "C:\Program Files\Java\jdk-11.0.6+10", openJFX11 is located under "C:\Program Files\Java\javafx-sdk-11.0.2"). Also note that NO Windows environment variables are needed for this, at all. The eclipse launcher takes all params correctly from the "eclipse_man.ini" file if the content is correct.

BUT I have to admit that our "eclipse_man.ini" file is currently created MANUALLY due to several issues:

(1) Somehow during the build all spaces and slashes in the "--module-path" declaration are wiped (so when declaring "C:\Program Files\Java..." as VM argument in the RCP product configuration, we unfortunately get "C:ProgramFilesJava..." in the eclipse_org.ini).
(2) It seems like there is currently no way for declaring the JDK path (i.e. "-vm" parameter) via product configuration (we would like to specify the exact JDK path for each of our application releases so that e.g. different versions can be used in parallel).

Due to these issues, we currently take the "eclipse_org.ini" (original output from the Tycho build) and have to adapt it to "eclipse_man.ini" (which can then successfully start our application).

Hope this helps a bit.

[Updated on: Wed, 12 February 2020 19:33]

Report message to a moderator

Re: Running eclipse.exe (octopus.exe) after maven tycho build does not start-up [message #1821755 is a reply to message #1821420] Wed, 19 February 2020 15:55 Go to previous messageGo to next message
Herbert Greilberger is currently offline Herbert GreilbergerFriend
Messages: 4
Registered: December 2019
Junior Member
Tanks a lot for your answer. I am going to have a look to your attachments the next days. I will provide another reply about the results. Thanks Alain.
Re: Running eclipse.exe (octopus.exe) after maven tycho build does not start-up [message #1821905 is a reply to message #1821420] Sat, 22 February 2020 14:52 Go to previous messageGo to next message
Herbert Greilberger is currently offline Herbert GreilbergerFriend
Messages: 4
Registered: December 2019
Junior Member
Hi Michael.
I have adapted octopus.ini manually the way you proposed and it worked. I can run the tycho-built octopus product with the manually changed octopus.ini, now. I appriciate your help very much. Hopefully, in future, they will fix the issues you mentioned to get the original output from the Tycho build working right away.
Have a nice time!
Re: Running eclipse.exe (octopus.exe) after maven tycho build does not start-up [message #1821933 is a reply to message #1821905] Sun, 23 February 2020 14:41 Go to previous message
Michael Marton is currently offline Michael MartonFriend
Messages: 7
Registered: August 2015
Junior Member
Glad to hear that it worked!

BTW: We found a way to "automate" the overwriting of the original Tycho output "ini" file with our own, adapted file. It was realized by means of the "maven-antrun-plugin".
The attached pom.xml from our product plugin does two simple steps in the course of the Tycho build:
(1) Extract the Tycho output (zip archive)
(2) Overwrite the original "ini" file with the adapted one from our workspace

Hope this helps.

  • Attachment: pom.xml
    (Size: 3.00KB, Downloaded 100 times)

[Updated on: Sun, 23 February 2020 14:41]

Report message to a moderator

Previous Topic:e4 application javafx Classloading problem
Next Topic:Legal and practical constraints for using the openjfx-osgi p2 repository
Goto Forum:
  


Current Time: Sat Apr 20 03:59:41 GMT 2024

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

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

Back to the top