Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » JavaFX Eclipse 3.x Project creation problem(No available bundle exports package javafx.*)
JavaFX Eclipse 3.x Project creation problem [message #1805735] Mon, 22 April 2019 23:29 Go to next message
Paul S is currently offline Paul SFriend
Messages: 2
Registered: April 2019
Junior Member
Hello,
I'm trying to make my own View project with JavaFX. I tried to follow the "Tutorial 2", but it doesn't work in my Eclipse Photon (4.8.0) and newer versions.

I'm using oracle jdk 1.8 and debian linux x64. I've installed e(fx)clipse from update site 3.3.0 version and it works fine. I can build and run my application (not views).

Now i'm following steps in wiki.eclipse.org/Efxclipse/Tutorials/Tutorial2 . But after i created JavaFX Eclipse 3.x Project i got 28 Errors in the MANIFEST.MF:

No available bundle exports package 'javafx.animation'
No available bundle exports package 'javafx.application'
...
etc.
I get it for all javafx.* Import-Packages.

Here is my MANIFEST.MF:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: My_Fx_View
Bundle-SymbolicName: My_Fx_View;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: my_fx_view.Activator
Require-Bundle: org.eclipse.ui,
 org.eclipse.core.runtime,
 org.eclipse.fx.ui.workbench3;bundle-version="3.3.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Automatic-Module-Name: My_Fx_View
Import-Package: javafx.animation;version="2.0.0",
 javafx.application;version="2.0.0",
 javafx.beans;version="2.0.0",
 javafx.beans.binding;version="2.0.0",
 javafx.beans.property;version="2.0.0",
 javafx.beans.value;version="2.0.0",
 javafx.collections;version="2.0.0",
 javafx.concurrent;version="2.0.0",
 javafx.embed.swing;version="2.0.0",
 javafx.event;version="2.0.0",
 javafx.fxml;version="2.0.0",
 javafx.geometry;version="2.0.0",
 javafx.scene;version="2.0.0",
 javafx.scene.chart;version="2.0.0",
 javafx.scene.control;version="2.0.0",
 javafx.scene.control.cell;version="2.0.0",
 javafx.scene.effect;version="2.0.0",
 javafx.scene.image;version="2.0.0",
 javafx.scene.input;version="2.0.0",
 javafx.scene.layout;version="2.0.0",
 javafx.scene.media;version="2.0.0",
 javafx.scene.paint;version="2.0.0",
 javafx.scene.shape;version="2.0.0",
 javafx.scene.text;version="2.0.0",
 javafx.scene.transform;version="2.0.0",
 javafx.scene.web;version="2.0.0",
 javafx.stage;version="2.0.0",
 javafx.util;version="2.0.0"
Bundle-ActivationPolicy: lazy


I can't understand what i've missed.

BTW i downloaded 'all in one' Eclipse Neon version from efxclipse.bestsolution.at/install.html#all-in-one and everything is OK. I can create and run my View.

So, could you tell me what i'm doing wrong with Photon and newer versions or show me another way how i can create Views with JavaFX.
Re: JavaFX Eclipse 3.x Project creation problem [message #1805782 is a reply to message #1805735] Tue, 23 April 2019 21:18 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Looks like this wizard is out-of-date. The import-package is NOT needed anymore. Just remove them from the MANIFEST.MF
Re: JavaFX Eclipse 3.x Project creation problem [message #1805783 is a reply to message #1805782] Tue, 23 April 2019 21:51 Go to previous messageGo to next message
Paul S is currently offline Paul SFriend
Messages: 2
Registered: April 2019
Junior Member
Thanks a lot! It's fixed my issue.
Re: JavaFX Eclipse 3.x Project creation problem [message #1844895 is a reply to message #1805782] Wed, 29 September 2021 07:22 Go to previous messageGo to next message
Suseendran Jeevanantham is currently offline Suseendran JeevananthamFriend
Messages: 8
Registered: September 2021
Junior Member
Yes, removing the packages from MANIFEST.MF resolved the issue. But however the JavaFx components are not loaded as expected.


Here is the stack overflow link which includes the detailed info:
https://stackoverflow.com/questions/69371081/build-errors-while-creating-eclipse-plugin-in-project-with-javafx-eclipse-3-x-pr?noredirect=1#comment122620697_69371081

Basically,

I am using JDK 11.0.11

It throws the exception "Plug-in "MyJavaFXPlugin" was unable to instantiate class "myjavafxplugin.views.MyViewPart". while trying to access the plug-in tab.

Please advice on how to resolve this issue.

Here is the complete error details below:
org.eclipse.core.runtime.CoreException: Plug-in "MyJavaFXPlugin" was unable to instantiate class "myjavafxplugin.views.MyViewPart".
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:212)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:206)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:920)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:246)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:63)
at org.eclipse.ui.internal.registry.ViewDescriptor.createView(ViewDescriptor.java:61)
at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:104)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPart(CompatibilityPart.java:304)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:342)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:995)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:960)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:140)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:403)
at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:330)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:202)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:91)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:60)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:42)
at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:132)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:994)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:658)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$1.run(PartRenderingEngine.java:543)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:527)
at org.eclipse.e4.ui.workbench.renderers.swt.ElementReferenceRenderer.createWidget(ElementReferenceRenderer.java:73)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:994)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:658)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:762)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:727)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:711)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.subscribeTopicToBeRendered(PartRenderingEngine.java:161)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
at org.eclipse.e4.core.di.internal.extensions.EventObjectSupplier$DIEventHandler.handleEvent(EventObjectSupplier.java:92)
at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:205)
at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:203)
at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:228)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151)
at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:133)
at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:75)
at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:44)
at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:55)
at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:63)
at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:424)
at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setToBeRendered(UIElementImpl.java:314)
at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:655)
at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:624)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:786)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:757)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:679)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:674)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1251)
at org.eclipse.ui.internal.WorkbenchPage.showPart(WorkbenchPage.java:1252)
at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1240)
at org.eclipse.ui.internal.WorkbenchPage.lambda$11(WorkbenchPage.java:4249)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:74)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:4247)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:4229)
at org.eclipse.ui.internal.quickaccess.providers.ViewElement.execute(ViewElement.java:93)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4029)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3629)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1041)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
at org.eclipse.equinox.launcher.Main.main(Main.java:1440)
Caused by: java.lang.NoClassDefFoundError: javafx/scene/Parent
at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137)
at java.base/java.lang.Class.getConstructor0(Class.java:3342)
at java.base/java.lang.Class.getDeclaredConstructor(Class.java:2553)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:204)
... 93 more
Caused by: java.lang.ClassNotFoundException: javafx.scene.Parent cannot be found by MyJavaFXPlugin_1.0.0.qualifier
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:506)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:170)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 98 more

[Updated on: Wed, 29 September 2021 15:21]

Report message to a moderator

Re: JavaFX Eclipse 3.x Project creation problem [message #1845012 is a reply to message #1844895] Sat, 02 October 2021 15:44 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
so is our OSGi-Hook present at runtime?
Re: JavaFX Eclipse 3.x Project creation problem [message #1845013 is a reply to message #1845012] Sat, 02 October 2021 15:45 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
and how did you add the OpenJFX dependency? Did you start with special flags? Do you use our prepacked JavaFX-OSGi-Modules?
Re: JavaFX Eclipse 3.x Project creation problem [message #1845021 is a reply to message #1845013] Sun, 03 October 2021 12:29 Go to previous messageGo to next message
Suseendran Jeevanantham is currently offline Suseendran JeevananthamFriend
Messages: 8
Registered: September 2021
Junior Member
Thank you for your response.

Here are the steps I followed from Scratch:

- Install JDK 11.0.11
- Install Eclipse 4.21.0
- Install "Eclipse PDE (Plug-in Development Environment) latest" from Eclipse MarketPlace
- Install "e(fx)clipse 3.7.0" from Eclipse MarketPlace
- Download JavaFX SDK version 17.0.0.1 (Windows - 64bit) from https://gluonhq.com/products/javafx/
- Restart the Eclipse,

- Select Window -> Preferences
- Select Java -> Build Path -> User Libraries
- Create New -> JavaFX Library
- Click "Add External JARs" and import the .jar files from the Java SDK's lib folder
- Click "Apply and Close"

- File -> New -> Plug-in project
- Select "JavaFX Eclipse 3.x Project" as a template

After creating the project, I am getting the build errors in the MANIFEST.MF for all the JavaFX packages under the Import-Package

- Select the created project and open Build Path -> Configure Build Path
- Go to the "Libraries" tab
- Add the JavaFX library (which was created above) under the ClassPath
- Click "Apply and Close"

The MANIFEST.MF errors still exist.


Since I am new to this technology, I am not sure of the below terms:

- OpenJFX dependency?
- Special flags
- Prepacked JavaFX-OSGi-Modules?


Please guide us on how to proceed further. Our goal is to create a plugin with JavaFX functionalities for rich UIs
Re: JavaFX Eclipse 3.x Project creation problem [message #1845024 is a reply to message #1845021] Sun, 03 October 2021 17:17 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
we you fixed the compile time story but left out the runtime part. The simplest solution: Download ZuluFX and you are good to go. All others require that you are not a beginner. Sounds hard but believe me that's the best way to start for you at the moment.
Re: JavaFX Eclipse 3.x Project creation problem [message #1845032 is a reply to message #1845024] Mon, 04 October 2021 07:17 Go to previous messageGo to next message
Suseendran Jeevanantham is currently offline Suseendran JeevananthamFriend
Messages: 8
Registered: September 2021
Junior Member
Hi,

Please find the attached video which illustrates all the steps I followed.

As per our understanding, ZuluFX clubs both Java JDK and JavaFX SDK. Earlier, I was adding the JavaFX library manually to the project. But using ZuluFX resolves that dependency.

However, the error on the package still exists.

Note: We have even tried configured a different Target Platform based on the below reference:
https://wiki.eclipse.org/Efxclipse/Tutorials/Tutorial2

Still no luck. We really not sure what is missing further.

Kindly advice.
  • Attachment: Untitled.mp4
    (Size: 4.82MB, Downloaded 105 times)
Re: JavaFX Eclipse 3.x Project creation problem [message #1847438 is a reply to message #1845032] Wed, 27 October 2021 07:12 Go to previous messageGo to next message
Suseendran Jeevanantham is currently offline Suseendran JeevananthamFriend
Messages: 8
Registered: September 2021
Junior Member
Hi Thomas,

Configuring the target platform also did not resolve the issue.

I have tried the below ways:

1. https://wiki.eclipse.org/Efxclipse/Tutorials/Tutorial2

2. https://www.youtube.com/watch?v=_eunUfSn2uo (As you suggested).

Both did not resolve the issue. Please help us with this.

Thanks in Advance,

[Updated on: Wed, 27 October 2021 15:21]

Report message to a moderator

Re: JavaFX Eclipse 3.x Project creation problem [message #1847614 is a reply to message #1847438] Tue, 02 November 2021 12:37 Go to previous messageGo to next message
Suseendran Jeevanantham is currently offline Suseendran JeevananthamFriend
Messages: 8
Registered: September 2021
Junior Member
Hi Tom,

Everything is working fine with the Eclipse Luna version and with JDK 8.

The problem is occurring only with the latest Eclipse IDE with JDK11

I have configured the Target Platform to include the below:
1. Target Platform Feature
2. Minimum JavaFX OSGi integration bundles

And with respect to the OpenJFX dependency, I have created a separate configuration Plugin project and dumped all the JavaFX SDK Jar files, and included the plugin project in both the Target Platform and in the Manifest.MF (Under Require-Bundle) of my JavaFX plugin project

Please help me with what am I missing further.

Thanks,
Re: JavaFX Eclipse 3.x Project creation problem [message #1847776 is a reply to message #1847614] Mon, 08 November 2021 06:56 Go to previous message
Suseendran Jeevanantham is currently offline Suseendran JeevananthamFriend
Messages: 8
Registered: September 2021
Junior Member
Downloaded the plugins manually from the link https://downloads.efxclipse.bestsolution.at/p2-repos/openjfx-17/plugins/

Added the downloaded plugins directly to the Target Platform.

This resolved the issue
Previous Topic:WebView crashing the VM in RCP app
Next Topic:Cannot download openjfx*linux* jars
Goto Forum:
  


Current Time: Fri Oct 04 22:20:47 GMT 2024

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

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

Back to the top