SwingNode - ClassNotFoundException [message #1401910] |
Wed, 16 July 2014 08:39 |
Danny Tramnitzke Messages: 25 Registered: April 2014 |
Junior Member |
|
|
Hi all,
I'm trying to integrate a Swing component into my E4 FX application.
Therefore I have a certain Part class
import javafx.embed.swing.SwingNode;
import javafx.scene.layout.BorderPane;
import javax.annotation.PostConstruct;
import javax.swing.SwingUtilities;
import my.project.efx.swing.SwingPartJPanel;
public class SwingPart {
@PostConstruct
public void init(BorderPane pane) {
SwingNode swingNode = new SwingNode();
createSwingPart(swingNode);
pane.setCenter(swingNode);
}
private void createSwingPart(final SwingNode swingNode) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
swingNode.setContent(new SwingPartJPanel());
}
});
}
}
However, when embedding this as a Part in my E4 application and running this on JDK8 with eclipse-SDK-4.4-win32-x86_64-efx-1.0.0-SNAPSHOT I get an exception
!ENTRY org.eclipse.e4.ui.workbench 4 0 2014-07-16 10:21:55.363
!MESSAGE Unable to create class 'my.project.efx.swing.SwingPart' from bundle '36'
!STACK 0
org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: javafx/embed/swing/SwingNode
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:348)
at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:258)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:104)
...
Caused by: java.lang.NoClassDefFoundError: javafx/embed/swing/SwingNode
at java.lang.Class.getDeclaredConstructors0(Native Method)
...
Caused by: java.lang.ClassNotFoundException: javafx.embed.swing.SwingNode cannot be found by my.project.efx.app_1.0.0.qualifier
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:423)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:336)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:328)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 73 more
My plugin.xml says:
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Shouldn't javafx.embed.swing.SwingNode be found any time since it is part of the java runtime ?
Best Regards,
Danny
[Updated on: Wed, 16 July 2014 08:41] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03572 seconds