FXCanvas not found during plugin export. [message #1622950] |
Wed, 18 February 2015 21:16 |
Piotr Iksowski Messages: 27 Registered: October 2014 |
Junior Member |
|
|
Hello,
I'm writting very simple plugin using Java 8 and JavaFX (some menu and opening window after some action on this menu). When I'm running this plugin from inside Eclipse (running second instance) to check it, everything goes fine. Unfotunately when I'm trying to export this plugin, I'm getting error with info that "import javafx.embed.swt.FXCanvas cannot be resolved".
I've found in some old discussion on this forum, that there is some very ugly solution and it relies on adding jfxrt.jar and jfxswt.jar to the project and to classpath. After such operation I could export whole plugin and install it in other Eclipse. Unfortunately plugin is not working corectly. My "item" in menu appears, but when I'm trying to launch action by clicking on it, nothing happens (there is JavaFX used in this action). No error, no excepion in command line.... nothing. When I'm writting the same thing using SWT, everything works fine.
What could be a reason of such behavior ? Maybe there is some more elegant way to resolve FXCanvas import (jfswt.jar is JRE library... so maybe there is no need to include it to plugin).
I'll be appreciate for help.
[Updated on: Thu, 19 February 2015 09:30] Report message to a moderator
|
|
|
|
|
Re: FXCanvas not found during plugin export. [message #1624125 is a reply to message #1623999] |
Thu, 19 February 2015 15:29 |
Piotr Iksowski Messages: 27 Registered: October 2014 |
Junior Member |
|
|
Great tips ! Thanks for the reply.
ad. a)
I got this:
java.lang.IllegalAccessError: tried to access class javafx.embed.swt.FXCanvas$1 from class javafx.embed.swt.FXCanvas
at javafx.embed.swt.FXCanvas.<init>(FXCanvas.java:161)
at samplemenuplugin.actions.SampleAction.run(SampleAction.java:85)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:253)
at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:237)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4454)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1388)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3799)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3409)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
ad. b)
Yes.
ad. c)
FXClassLoader#createJREBundledClassloader - Started
FXClassLoader#createJREBundledClassloader - Assumed location (Java 8/Java 7): /usr/lib/jvm/java-8-oracle/jre/lib/ext/jfxrt.jar
FXClassLoader#createJREBundledClassloader - SWT is available use different loading strategy
FXClassLoader#createJREBundledClassloader - Searching for SWT-FX integration at /usr/lib/jvm/java-8-oracle/jre/lib/jfxswt.jar
FXClassLoader#createJREBundledClassloader - Found SWT/FX
FXClassLoader#createJREBundledClassloader - Delegate to system classloader
FXClassLoader.SWTFXClassloader#init - Primary Loader sun.misc.Launcher$ExtClassLoader@1e284d90
FXClassLoader.SWTFXClassloader#init - Lastresort Loader org.eclipse.osgi.internal.loader.EquinoxClassLoader@b5ac0c1[org.eclipse.swt:3.103.1.v20140903-1938(id=672)]
FXClassLoader#createJREBundledClassloader - Ended
FXModuleClassloader#findLocalClass trying to load class 'javafx.scene.Parent'
FXModuleClassloader#findLocalClass trying to load class 'javafx.scene.layout.HBox'
FXModuleClassloader#findLocalClass trying to load class 'javafx.scene.paint.Paint'
FXModuleClassloader#findLocalClass trying to load class 'javafx.scene.paint.Color'
FXModuleClassloader#findLocalClass trying to load class 'javafx.scene.effect.Effect'
FXModuleClassloader#findLocalClass trying to load class 'javafx.scene.effect.MotionBlur'
FXModuleClassloader#findLocalClass trying to load class 'javafx.scene.effect.Reflection'
[TAG1]
[TAG3]
[TAG4]
[TAG5]
[TAG6]
FXModuleClassloader#findLocalClass trying to load class 'javafx.embed.swt.FXCanvas'
FXModuleClassloader#findLocalClass - Someone is trying to load FXCanvas. Need to check for GTK3
FXModuleClassloader#findLocalClass trying to load class 'org.eclipse.swt.SWT'
FXClassLoader.SWTFXClassloader#findClass - Loading org.eclipse.swt.SWT with primary
FXClassLoader.SWTFXClassloader#findClass - ClassNotFoundException thrown
FXClassLoader.SWTFXClassloader#findClass - Loading org.eclipse.swt.SWT with last resort
FXClassLoader.SWTFXClassloader#findClass - Result org.eclipse.swt.SWT class org.eclipse.swt.SWT
FXModuleClassloader#findLocalClass - We are on GTK need to take a closer look
FXModuleClassloader#findLocalClass trying to load class 'org.eclipse.swt.internal.gtk.OS'
FXClassLoader.SWTFXClassloader#findClass - Loading org.eclipse.swt.internal.gtk.OS with primary
FXClassLoader.SWTFXClassloader#findClass - ClassNotFoundException thrown
FXClassLoader.SWTFXClassloader#findClass - Loading org.eclipse.swt.internal.gtk.OS with last resort
FXClassLoader.SWTFXClassloader#findClass - Result org.eclipse.swt.internal.gtk.OS class org.eclipse.swt.internal.gtk.OS
FXModuleClassloader#findLocalClass - We are on GTK3 - too bad need to disable JavaFX for now else we'll crash the JVM
FXModuleClassloader#findLocalClass trying to load class 'com.sun.javafx.embed.HostInterface'
FXModuleClassloader#findLocalClass trying to load class 'javafx.embed.swt.CustomTransfer'
FXClassLoader.SWTFXClassloader#findClass - Loading javafx.embed.swt.CustomTransfer with primary
FXClassLoader.SWTFXClassloader#findClass - ClassNotFoundException thrown
FXClassLoader.SWTFXClassloader#findClass - Loading javafx.embed.swt.CustomTransfer with last resort
FXClassLoader.SWTFXClassloader#findClass - Even last resort was unable to load javafx.embed.swt.CustomTransfer
FXClassLoader.SWTFXClassloader#findClass - Loading org.eclipse.swt.dnd.ByteArrayTransfer with primary
FXClassLoader.SWTFXClassloader#findClass - ClassNotFoundException thrown
FXClassLoader.SWTFXClassloader#findClass - Loading org.eclipse.swt.dnd.ByteArrayTransfer with last resort
FXClassLoader.SWTFXClassloader#findClass - Result org.eclipse.swt.dnd.ByteArrayTransfer class org.eclipse.swt.dnd.ByteArrayTransfer
FXModuleClassloader#findLocalClass trying to load class 'javafx.embed.swt.FXCanvas$1'
FXClassLoader.SWTFXClassloader#findClass - Loading javafx.embed.swt.FXCanvas$1 with primary
FXClassLoader.SWTFXClassloader#findClass - ClassNotFoundException thrown
FXClassLoader.SWTFXClassloader#findClass - Loading javafx.embed.swt.FXCanvas$1 with last resort
FXClassLoader.SWTFXClassloader#findClass - Even last resort was unable to load javafx.embed.swt.FXCanvas$1
FXClassLoader.SWTFXClassloader#findClass - Loading org.eclipse.swt.widgets.Listener with primary
FXClassLoader.SWTFXClassloader#findClass - ClassNotFoundException thrown
FXClassLoader.SWTFXClassloader#findClass - Loading org.eclipse.swt.widgets.Listener with last resort
FXClassLoader.SWTFXClassloader#findClass - Result org.eclipse.swt.widgets.Listener interface org.eclipse.swt.widgets.Listener
And this (info from (c)) showed that default SWT_GTK3 was improper. I exported SWT_GTK3=0 in console before running Eclipse and the plugin started working without any problems. So problem is partly solved.
Unfortunately I still don't know how to solve it in final version to make it automatically. There is still a need to set the environment variable by hand before installing the plugin.
Do you have any suggestions how it could be solved ?
[Updated on: Thu, 19 February 2015 15:30] Report message to a moderator
|
|
|
|
|
|
|
|
Re: FXCanvas not found during plugin export. [message #1647859 is a reply to message #1647171] |
Tue, 03 March 2015 16:47 |
Piotr Iksowski Messages: 27 Registered: October 2014 |
Junior Member |
|
|
Thanks for reply. Your answers are really useful.
Thomas Schindl wrote on Tue, 03 March 2015 09:36On 03.03.15 00:12, Piotr Iksowski wrote:
> Ok. So I've downloaded E(fx)clipse and I checked two simple plugins:
>
> 1. Exactly the same plugin as I described in the post. Some "Sample
> menu" that is opening JavaFX window. Behaviour is exactly the same as
> for simple Eclipse with FX plugin. If I don't add jfxrt.jar and
> jfxswt.jar, I won't be able to export it (FXCanvas not recognized when
> exporting).
This is because jfxswt.jar is not on the classpath so:
a) use maven to build your plugin
b) modify the build.properties to point to the jfxswt.jar
c) copy jfxswt.jar to the ext-folder of the jdk/jre used to build
I would strongly advice to use a) because this is also how you will
build the stuff on hudson/jenkins/.... .
Ok, seems it's working. I thought that jfxswt.jat is in classpath by default in Java 8.
Thomas Schindl wrote on Tue, 03 March 2015 09:36On 03.03.15 00:12, Piotr Iksowski wrote:
>
> 2. Plugin from https://wiki.eclipse.org/Efxclipse/Tutorials/Tutorial2
> I followed each step as in tutorial. Everything works fine if I'm
> running it from Eclipse. When I'm exporting it to "dropins" and
> restarting IDE nothing happens. Plugin seems to be not installed, no
> error or exceptions is thrown on console where eclipse is run. (even
> with -Defxclipse.osgi.hook.debug=true in eclipse.ini file and setting
> SWT_GTGK3 to 0)
> ..............................
>
> Is there any example(tutorial) how to write, export and install plugin
> which is using JavaFX in Eclipse ?
The reason for that is most likely that your bundle did not resolve
because you have NOT deployed org.eclipse.fx.ui.workbench3 hence your
bundle does not resolve.
You can check the state of the bundle by:
* select the console view
* open the drop down in the far right
* select Host OSGi Console
* enter "ss org.eclipse.fx.ui.workbench3"
=> the first value in the list is the bundleId which you need in the
next step
* diag $BUNDLE_ID
Tom
It seems that org.eclipse.fx.ui.workbench3 is lacking:
osgi> ss org.eclipse.fx.ui.workbench3
"Framework is launched."
id State Bundle
osgi>
Is there any way to include org.eclipse.fx.ui.workbench3 into Target platform of the environment without using Tycho (or maven) ? Maybe there is a way to deploy it somehow with the plugin ?
I'm searching some simple solution for that, but I'm a little afraid that without getting acknowledge with Tycho, I won't resolve this and many other problems :/
|
|
|
Re: FXCanvas not found during plugin export. [message #1648066 is a reply to message #1647859] |
Tue, 03 March 2015 19:04 |
Thomas Schindl Messages: 6651 Registered: July 2009 |
Senior Member |
|
|
On 03.03.15 17:47, Piotr Iksowski wrote:
> Thanks for reply. Your answers are really useful.
>
> Thomas Schindl wrote on Tue, 03 March 2015 09:36
>> On 03.03.15 00:12, Piotr Iksowski wrote:
>> > Ok. So I've downloaded E(fx)clipse and I checked two simple plugins:
>> > > 1. Exactly the same plugin as I described in the post. Some "Sample
>> > menu" that is opening JavaFX window. Behaviour is exactly the same as
>> > for simple Eclipse with FX plugin. If I don't add jfxrt.jar and
>> > jfxswt.jar, I won't be able to export it (FXCanvas not recognized when
>> > exporting).
>>
>> This is because jfxswt.jar is not on the classpath so:
>> a) use maven to build your plugin
>> b) modify the build.properties to point to the jfxswt.jar
>> c) copy jfxswt.jar to the ext-folder of the jdk/jre used to build
>>
>> I would strongly advice to use a) because this is also how you will
>> build the stuff on hudson/jenkins/.... .
>
>
> Ok, seems it's working. I thought that jfxswt.jat is in classpath by
> default in Java 8.
jfxrt.jar is on the ext-classpath and i'm thankful that jfxswt.jar -
jfxswt.jar requires classes from swt! So if they would have put that on
the classpath this would have been a nightmare!
>
> Thomas Schindl wrote on Tue, 03 March 2015 09:36
>> On 03.03.15 00:12, Piotr Iksowski wrote:
>> > > 2. Plugin from https://wiki.eclipse.org/Efxclipse/Tutorials/Tutorial2
>> > I followed each step as in tutorial. Everything works fine if I'm
>> > running it from Eclipse. When I'm exporting it to "dropins" and
>> > restarting IDE nothing happens. Plugin seems to be not installed, no
>> > error or exceptions is thrown on console where eclipse is run. (even
>> > with -Defxclipse.osgi.hook.debug=true in eclipse.ini file and setting
>> > SWT_GTGK3 to 0)
>> > ..............................
>> > > Is there any example(tutorial) how to write, export and install
>> plugin
>> > which is using JavaFX in Eclipse ? :)
>>
>> The reason for that is most likely that your bundle did not resolve
>> because you have NOT deployed org.eclipse.fx.ui.workbench3 hence your
>> bundle does not resolve.
>>
>> You can check the state of the bundle by:
>> * select the console view
>> * open the drop down in the far right
>> * select Host OSGi Console
>> * enter "ss org.eclipse.fx.ui.workbench3"
>> => the first value in the list is the bundleId which you need in the
>> next step
>> * diag $BUNDLE_ID
>>
>> Tom
>
>
> It seems that org.eclipse.fx.ui.workbench3 is lacking:
> osgi> ss org.eclipse.fx.ui.workbench3
> "Framework is launched."
>
> id State Bundle
> osgi>
> Is there any way to include org.eclipse.fx.ui.workbench3 into Target
> platform of the environment without using Tycho (or maven) ? Maybe there
> is a way to deploy it somehow with the plugin ?
>
> I'm searching some simple solution for that, but I'm a little afraid
> that without getting acknowledge with Tycho, I won't resolve this and
> many other problems :/
If you are doing Eclipse plug-in dev at least semi professional there's
not way around getting to learn how you deal with build tool who is able
to build OSGi-Bundles - maven tycho is one of them, bnd & bndtools
another one, gradle also does understand OSGi but it calls out the bnd.
To get your case running things are quite simple:
* create a feature in your IDE who has
- your.custom.plugin
- org.eclipse.fx.ui.workbench3
* export the feature
* drop your.custom.plugin & org.eclipse.fx.ui.workbench3 to dropins
folder and thing would work
Final word - deploying through dropins is also a bad way to do plugin
installation you should generate a p2-repo and use the install wizard
for real deployment.
Tom
|
|
|
|
|
Re: FXCanvas not found during plugin export. [message #1691501 is a reply to message #1691469] |
Tue, 07 April 2015 16:25 |
Piotr Iksowski Messages: 27 Registered: October 2014 |
Junior Member |
|
|
Thanks. I had added pluginManagement part with jfxswt.jar. After that it was compiling, but during running the plugin I was getting exception about not recognizing FXCanvas.
To solve it, I have added jfxswt.jar path to Bundle-Classpath of plugin project. Currently there is no more exception about not recognizing FXCanvas, but there is still problem with jfxrt. I'm getting mentioned exception about HostInterface.
[Edit 1]
I've added jfxrt to Bundle-Classpath and now there is also no exception about not recognizing jfxrt.jar classes.
Unfortunately now I'm getting other exception....
java.lang.IllegalStateException: Not on FX application thread; currentThread = JavaFX Application Thread
at com.sun.javafx.tk.Toolkit.checkFxUserThread(Toolkit.java:204)
at com.sun.javafx.tk.quantum.QuantumToolkit.checkFxUserThread(QuantumToolkit.java:364)
at javafx.scene.Scene.<init>(Scene.java:323)
at javafx.scene.Scene.<init>(Scene.java:267)
at javafx.scene.SceneBuilder.build(SceneBuilder.java:660)
at basicplugin.actions.SampleAction.createFXScene(SampleAction.java:112)
at basicplugin.actions.SampleAction.run(SampleAction.java:72)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:253)
at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:237)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4454)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1388)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3799)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3409)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
When I'm running exactly the same code, but using simple plugin project without maven/tycho and creating own target platform, then this code is running without any problems. What could be the reason of it ?
[Updated on: Tue, 07 April 2015 16:47] Report message to a moderator
|
|
|
|
|
|
Re: FXCanvas not found during plugin export. [message #1691599 is a reply to message #1691588] |
Wed, 08 April 2015 12:32 |
Piotr Iksowski Messages: 27 Registered: October 2014 |
Junior Member |
|
|
Thomas Schindl wrote on Wed, 08 April 2015 11:01First all on what version of e(fx)clipse are you working:
* 1.2.0
* 2.0.0 nightly
1.2.0 e(fx)clipse plugin installed on Eclipse EE Luna SR2.
Thomas Schindl wrote on Wed, 08 April 2015 11:01
Specify what running means:
a) running with an Inner-Eclipse instance
b) installed into another Eclipse instance
b) installed into another Eclipse EE Luna SR2 instance
As I mentioned before, I've got following tycho/maven projects:
- Plugin project
- Feature project
- Target project
- Aggregator project
- Update site project.
After building the project (by "Run-> Maven build" or from command line mvn clean install/verify/package...), I'm getting ready to install repository in Update site project/target/repository.
I'm installing it in separate Eclipse EE IDE (Luna without any JavaFX support) by Help->Install new software....
Plugin is installing without any problems, but when I'm trying to use(open) some plugin component which is using FXCanvas, then I'm getting exception:
java.lang.NoClassDefFoundError: javafx/embed/swt/FXCanvas
at basicplugin.actions.SampleAction.run(SampleAction.java:70)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:253)
at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:237)
....
Component is quite simple(action binded with some menu button), for example:
public class SampleAction implements IWorkbenchWindowActionDelegate {
private IWorkbenchWindow window;
public SampleAction() {
}
public void run(IAction action) {
// SWT
try {
Display display = Display.getCurrent();
if (display == null) {
display = new Display();
}
final Shell shell = new Shell(display);
shell.setText("JavaFX / SWT Integration");
shell.setLayout(new FillLayout());
final FXCanvas canvas = new FXCanvas(shell, SWT.NONE); <- here throwing exception
final Scene scene = createFXScene();
canvas.setScene(scene);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()){
display.sleep();
}
}
// display.dispose();
} catch (Throwable e) {
e.printStackTrace();
}
}
.......
}
Plugin components without FXCanvas are working fine.
Quote:This is what the adapter hooks are used for they modify the classloader
hierarchy to include jfxswt.jar. What happens if you run with
-Defxclipse.osgi.hook.debug=true.
After setting it and opening component that is using FXCanvas, I'm getting:
org.eclipse.m2e.logback.configuration: Initializing logback
FXClassLoader#createJREBundledClassloader - Started
FXClassLoader#createJREBundledClassloader - Assumed location (Java 8/Java 7): /usr/lib/jvm/java-8-oracle/jre/lib/ext/jfxrt.jar
FXClassLoader#createJREBundledClassloader - SWT is available use different loading strategy
FXClassLoader#createJREBundledClassloader - Searching for SWT-FX integration at /usr/lib/jvm/java-8-oracle/jre/lib/jfxswt.jar
FXClassLoader#createJREBundledClassloader - Found SWT/FX
FXClassLoader#createJREBundledClassloader - Delegate to system classloader
FXClassLoader.SWTFXClassloader#init - Primary Loader sun.misc.Launcher$ExtClassLoader@a3e458
FXClassLoader.SWTFXClassloader#init - Lastresort Loader org.eclipse.osgi.internal.loader.EquinoxClassLoader@320be73[org.eclipse.swt:3.103.2.v20150203-1313(id=672)]
FXClassLoader#createJREBundledClassloader - Ended
FXModuleClassloader#findLocalClass trying to load class 'javafx.scene.Parent'
FXModuleClassloader#findLocalClass trying to load class 'javafx.scene.layout.HBox'
FXModuleClassloader#findLocalClass trying to load class 'javafx.scene.paint.Paint'
FXModuleClassloader#findLocalClass trying to load class 'javafx.scene.paint.Color'
FXModuleClassloader#findLocalClass trying to load class 'javafx.scene.effect.Effect'
FXModuleClassloader#findLocalClass trying to load class 'javafx.scene.effect.MotionBlur'
FXModuleClassloader#findLocalClass trying to load class 'javafx.scene.effect.Reflection'
java.lang.NoClassDefFoundError: javafx/embed/swt/FXCanvas
at basicplugin.actions.SampleAction.run(SampleAction.java:59)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:253)
at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:237)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4454)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1388)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3799)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3409)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
Caused by: java.lang.ClassNotFoundException: javafx.embed.swt.FXCanvas cannot be found by BasicPlugin_1.0.0.201504081219
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:432)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:345)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:337)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 33 more
[Updated on: Wed, 08 April 2015 12:49] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|