Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » Java11 e4 application openjfx(Can't get a (simple) e4 application project to run (without specifying openjfx modules explicitly))
Java11 e4 application openjfx [message #1819395] Tue, 14 January 2020 14:39 Go to next message
Nico Beckers is currently offline Nico BeckersFriend
Messages: 15
Registered: January 2020
Junior Member
Hello everybody,

I am having some trouble getting an e4 application, together with openjfx and java11 (AdoptOpenJDK) to run.

The content of my target file looks like this:

<locations>
	<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
		<repository location="http://download.eclipse.org/efxclipse/runtime-released/3.5.0/site/"/>
		<unit id="org.eclipse.fx.core.feature.feature.group" version="3.5.0.201902252257"/>
		<unit id="org.eclipse.fx.slf4j.target.feature.feature.group" version="3.5.0.201902250700"/>
		<unit id="org.eclipse.fx.target.feature.feature.group" version="3.5.0.201902252257"/>
	</location>
	<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
		<repository location="http://download.eclipse.org/eclipse/updates/4.9"/>
		<unit id="org.eclipse.platform.sdk" version="4.9.0.I20180906-0745"/>
	</location>
	<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
		<repository location="http://downloads.efxclipse.bestsolution.at/p2-repos/openjfx-11/repository/"/>
		<unit id="openjfx.media.feature.feature.group" version="11.0.0.201901231300"/>
		<unit id="openjfx.standard.feature.feature.group" version="11.0.0.201901231300"/>
		<unit id="openjfx.swing.feature.feature.group" version="11.0.0.201901231300"/>
		<unit id="openjfx.swt.feature.feature.group" version="11.0.0.201901231300"/>
		<unit id="openjfx.web.feature.feature.group" version="11.0.0.201901231300"/>
	</location>
</locations>


but unless I add " --module-path <local-path>\javafx-sdk-11.0.2\lib --add-modules javafx.graphics,javafx.controls,javafx.fxml", I always get the following error when running (note: the projects compiles fine with this target):

!SESSION 2020-01-14 15:26:49.990 -----------------------------------------------
eclipse.buildId=unknown
java.version=11.0.5
java.vendor=AdoptOpenJDK
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Framework arguments:  -product <shortened>.application.product
Command-line arguments:  -product <shortened>.application.product -data <shortened>.app.product.product -dev file:<shortened>/.metadata/.plugins/org.eclipse.pde.core/<shortened>.app.product.product/dev.properties -os win32 -ws win32 -arch x86_64 -consoleLog -data @user.home/ws

!ENTRY org.eclipse.equinox.app 4 0 2020-01-14 15:26:52.996
!MESSAGE javafx/application/Application
!STACK 0
java.lang.NoClassDefFoundError: javafx/application/Application
	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:279)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:703)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:626)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:594)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:574)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:553)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:331)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:473)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:414)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:153)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	at org.eclipse.fx.ui.workbench.fx.E4Application.getJfxApplicationClass(E4Application.java:396)
	at org.eclipse.fx.ui.workbench.fx.E4Application.launchE4JavaFxApplication(E4Application.java:381)
	at org.eclipse.fx.ui.workbench.fx.E4Application.start(E4Application.java:179)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:199)
	at org.eclipse.equinox.internal.app.AnyThreadAppLauncher.run(AnyThreadAppLauncher.java:29)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassNotFoundException: javafx.application.Application cannot be found by org.eclipse.fx.ui.workbench.fx_3.5.0.201902252257
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:511)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:414)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:153)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	... 21 more


Does anyone know what is missing in order to get this to run?

Best regards.

[Updated on: Fri, 17 January 2020 12:02]

Report message to a moderator

Re: Java11 e4 application openjfx [message #1819461 is a reply to message #1819395] Wed, 15 January 2020 19:08 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6559
Registered: July 2009
Senior Member
Well does your launch config contain the openjfx features?
Re: Java11 e4 application openjfx [message #1819494 is a reply to message #1819461] Thu, 16 January 2020 09:39 Go to previous messageGo to next message
Nico Beckers is currently offline Nico BeckersFriend
Messages: 15
Registered: January 2020
Junior Member
Maybe that one is the problem, as I don't really know what you mean by that :)
I've tried adding the openjfx plugins as "Included Plug-Ins" in the feature(.xml), but your wording sounds like that is not what you meant (and my try did not work).
Re: Java11 e4 application openjfx [message #1819526 is a reply to message #1819494] Thu, 16 January 2020 18:56 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6559
Registered: July 2009
Senior Member
please file a ticket at https://github.com/eclipse-efx/efxclipse-rt so that we provide a sample Java11+ application
Re: Java11 e4 application openjfx [message #1819568 is a reply to message #1819526] Fri, 17 January 2020 12:01 Go to previous message
Nico Beckers is currently offline Nico BeckersFriend
Messages: 15
Registered: January 2020
Junior Member
I think I might have got it!
Looking at your first reply, I checked the feature.xml again and now added the openjfx features as "Included Features" and that seems to have done the trick (I feel like I've tried that before, but maybe something else went wrong back then).
Thanks!!!
Previous Topic:Switch perspective is slow in e(fx)clipse
Next Topic:Default e4 application project has errors
Goto Forum:
  


Current Time: Thu Jul 16 05:09:59 GMT 2020

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

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

Back to the top