Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » jfxswt not on the classpath
jfxswt not on the classpath [message #1403513] Thu, 24 July 2014 09:20 Go to next message
Marcel Austenfeld is currently offline Marcel AustenfeldFriend
Messages: 160
Registered: July 2009
Senior Member
Hello,

i'm not sure if this is the right forum to ask.

However in my application (RCP)i have a bundled jre (if exported) and in the application i use a JavaFX canvas (embedded in swt).

The jfxswt.jar doesn't work by default because it is not in the /ext directory of the jre. If i put the lib there everything seems to be on the classpath of my application (No compile errors).

However if i startup the RCP product (from within Eclipse) and then open the embedded JavaFX canvas i get the following error: org/eclipse/swt/widgets/Canvas not found....

If i put jfxswt.jar in an Eclipse plugin instead and export the packages for the RCP everything works fine.

My questions are:

Why is jfxswt not on the classpath or can't find swt. How can i bundle this library correctly in an RCP with a jre so that my application can use the jfxswt.jar classes.

Or would it be legal to copy the jfxswt.jar in a Eclipse plugin?

Thanks in advance for any help or information.



Re: jfxswt not on the classpath [message #1403526 is a reply to message #1403513] Thu, 24 July 2014 09:53 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi,

On 24.07.14 11:20, Marcel A. wrote:
> Hello,
>
> i'm not sure if this is the right forum to ask.
> However in my application (RCP)i have a bundled jre (if exported) and in
> the application i use a JavaFX canvas (embedded in swt).
>
> The jfxswt.jar doesn't work by default because it is not in the /ext
> directory of the jre. If i put the lib there everything seems to be on
> the classpath of my application (No compile errors).
> However if i startup the RCP product (from within Eclipse) and then open
> the embedded JavaFX canvas i get the following error:
> org/eclipse/swt/widgets/Canvas not found....

Right the reason is that the classloader which loads the FXCanvas must
also be able to access the SWT library so if you copy the jar it is on
the extension-classloader which naturally can not see SWT.

>
> If i put jfxswt.jar in an Eclipse plugin instead and export the packages
> for the RCP everything works fine.
>

That's not a good idea because FXCanvas makes use of internal JavaFX
APIs who can change from release to release. Your only advantage is that
because you ship the jre with the product you are under full control so
this might be an option if you let the legal part aside.

> My questions are:
> Why is jfxswt not on the classpath or can't find swt. How can i bundle

See above the reason which something on the ext-classpath can't find SWT
- if you want to see how we make this work can be seen in [1]

> this library correctly in an RCP with a jre so that my application can
> use the jfxswt.jar classes.
>

I would suggest you make use of org.eclipse.fx.ui.workbench3 this way
your UI does not need FXCanvas at compile time and then you make use of
org.eclipse.fx.osgi and org.eclipse.fx.javafx to get stuff appropiately
wired at runtime.

> Or would it be legal to copy the jfxswt.jar in a Eclipse plugin?
>

I'm not a lawyer so I can not really comment on if this is legal - the
best chance I see is that when you do this with open-jdk I doubt you can
do this with Oracle JDK.

I would suggest you use:
a) don't repackage you don't have any legal problems
b) keep jfxswt.jar out of ext else you get the classloader problem
c) you make use of our classloader hooks.

BTW we have a nice tutorial explaining how to make javafx work inside an
RCP see [2]

Tom

[1]http://git.eclipse.org/c/efxclipse/org.eclipse.efxclipse.git/tree/bundles/runtime/org.eclipse.fx.osgi/src/org/eclipse/fx/osgi/fxloader/FXClassLoader.java
[2]http://wiki.eclipse.org/Efxclipse/Tutorials/Tutorial2
Re: jfxswt not on the classpath [message #1403541 is a reply to message #1403526] Thu, 24 July 2014 10:28 Go to previous messageGo to next message
Marcel Austenfeld is currently offline Marcel AustenfeldFriend
Messages: 160
Registered: July 2009
Senior Member
Hello Tom,

thanks for your fast reply and help. Great links.

However how would i apply the classloader hook in [1] in my RCP product to load the FX classes?


Re: jfxswt not on the classpath [message #1403545 is a reply to message #1403541] Thu, 24 July 2014 10:39 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
You need to have the following bundles in your target platform:
* org.eclipse.fx.osgi
* org.eclipse.fx.javafx
* org.eclipse.fx.workbench3

and then all you need to make sure is that at dev time you launch with
-Dosgi.framework.extensions=org.eclipse.fx.osgi in your vm-arguments -
case you are assembeling the final product with the p2-director (e.g.
with maven-tycho) there's no more work needed because the p2-director
creates an entry in your config.ini.

If you want to see if the hook is active you need to pass
-Defxclipse.osgi.hook.debug=true which will give you informations on
what's going on under the covers.

Final note: If you target platform is NOT built from p2-repos but e.g.
the rcp stuff is referenced through a directory it is important that
instead of adding the p2 repo with the above bundles you need to copy
them over to your RCP-Target because org.eclipse.fx.osgi HAS TO reside
physically next to org.eclipse.osgi!

Tom


On 24.07.14 12:28, Marcel A. wrote:
> Hello Tom,
>
> thanks for your fast reply and help. Great links.
>
> However how would i apply the classloader hook in [1] in my RCP product
> to load the FX classes?
>
>
>
Re: jfxswt not on the classpath [message #1403554 is a reply to message #1403545] Thu, 24 July 2014 11:43 Go to previous messageGo to next message
Marcel Austenfeld is currently offline Marcel AustenfeldFriend
Messages: 160
Registered: July 2009
Senior Member
Hello Tom,

i have a feature based product with plugins references in a "classical" directory.

i've installed efxclipse from your update site.

Which plugins or feature do i have to add to my main plugin or product configuration?

Do i still need: -Dosgi.framework.extensions=org.eclipse.fx.osgi?







Re: jfxswt not on the classpath [message #1403561 is a reply to message #1403554] Thu, 24 July 2014 12:02 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
There should be a feature named "org.eclipse.fx.target.rcp.feature"
which holds exactly the 3 bundles you need. IIRC you still need the -D
when launching from an inner eclipse but you could give it a try without it.

Please note that if you installed the tooling into your eclipse you'll
still miss o.e.f.workbench3 and the above mentioned feature, so please
add http://download.eclipse.org/efxclipse/runtime-released/0.9.0/site to
your target platform as described in the tutorial (Step 9 & 10) because
the adapter hook is part of your classic install dir things should
operate without problems.

Tom

On 24.07.14 13:43, Marcel A. wrote:
> Hello Tom,
>
> i have a feature based product with plugins references in a "classical"
> directory.
>
> i've installed efxclipse from your update site.
> Which plugins or feature do i have to add to my main plugin or product
> configuration?
>
> Do i still need: -Dosgi.framework.extensions=org.eclipse.fx.osgi?
>
>
>
>
>
>
>
>
Re: jfxswt not on the classpath [message #1403565 is a reply to message #1403561] Thu, 24 July 2014 12:39 Go to previous messageGo to next message
Marcel Austenfeld is currently offline Marcel AustenfeldFriend
Messages: 160
Registered: July 2009
Senior Member
Hello Tom,

i added the org.eclipse.fx.target.rcp.feature and followed the steps 9&10.
However if i add the -D flag then i get the error below:

java.lang.NoClassDefFoundError: org/eclipse/osgi/baseadaptor/HookConfigurator
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:455)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:367)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:259)
at org.eclipse.osgi.internal.hookregistry.HookRegistry.loadConfigurators(HookRegistry.java:185)
at org.eclipse.osgi.internal.hookregistry.HookRegistry.initialize(HookRegistry.java:106)
at org.eclipse.osgi.internal.framework.EquinoxContainer.<init>(EquinoxContainer.java:73)
at org.eclipse.osgi.launch.Equinox.<init>(Equinox.java:31)
at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:297)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:232)
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: org.eclipse.osgi.baseadaptor.HookConfigurator
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 27 more

Do you have any idea what i'm doing wrong? Without the flag the canvas cannot be loaded.

[Updated on: Thu, 24 July 2014 12:40]

Report message to a moderator

Re: jfxswt not on the classpath [message #1403576 is a reply to message #1403565] Thu, 24 July 2014 13:10 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
on what platform are you luna or kepler. It is important that you use
the matching p2 repo, to me it looks like you added the Kepler p2-repo
(=0.9.0) but the rest of your platform is Luna.

Tom

On 24.07.14 14:39, Marcel A. wrote:
> Hello Tom,
>
> i added the org.eclipse.fx.target.rcp.feature and followed the steps 9&10.
> However if i add the -D flag then i get the error below:
>
> java.lang.NoClassDefFoundError:
> org/eclipse/osgi/baseadaptor/HookConfigurator
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
> at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
> at java.net.URLClassLoader.defineClass(URLClassLoader.java:455)
> at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:367)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:259)
> at
> org.eclipse.osgi.internal.hookregistry.HookRegistry.loadConfigurators(HookRegistry.java:185)
>
> at
> org.eclipse.osgi.internal.hookregistry.HookRegistry.initialize(HookRegistry.java:106)
>
> at
> org.eclipse.osgi.internal.framework.EquinoxContainer.<init>(EquinoxContainer.java:73)
>
> at org.eclipse.osgi.launch.Equinox.<init>(Equinox.java:31)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:297)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:232)
>
> 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:
> org.eclipse.osgi.baseadaptor.HookConfigurator
> at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> ... 27 more
>
> Do you have any idea what i'm doing wrong?
Re: jfxswt not on the classpath [message #1403583 is a reply to message #1403576] Thu, 24 July 2014 13:50 Go to previous messageGo to next message
Marcel Austenfeld is currently offline Marcel AustenfeldFriend
Messages: 160
Registered: July 2009
Senior Member
Hello Tom,

i don't want to bother any further. No i got no errors anymore by reinstalling everything but at runtime the canvas is still not available.

Thanks again for your time and patience.
Re: jfxswt not on the classpath [message #1403590 is a reply to message #1403583] Thu, 24 July 2014 14:01 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Did you do a package import for javafx.embed.swt in your MANIFEST.MF?
Please always provide the output. Do you see the hook being loaded?

Tom

On 24.07.14 15:50, Marcel A. wrote:
> Hello Tom,
>
> i don't want to bother any further. No i got no errors anymore by
> reinstalling everything but at runtime the canvas is still not available.
>
> Thanks again for your time and patience.
Re: jfxswt not on the classpath [message #1403612 is a reply to message #1403590] Thu, 24 July 2014 15:04 Go to previous messageGo to next message
Marcel Austenfeld is currently offline Marcel AustenfeldFriend
Messages: 160
Registered: July 2009
Senior Member
Hello Tom,

i will continuou tomorrow. Thanks for your help.
Re: jfxswt not on the classpath [message #1406873 is a reply to message #1403590] Mon, 11 August 2014 10:25 Go to previous messageGo to next message
Marcel Austenfeld is currently offline Marcel AustenfeldFriend
Messages: 160
Registered: July 2009
Senior Member
Hello Tom,

i want to give you a feedback about embedding jfxswt.

I was finally able to run your implementation and more important understood the way it works. Thanks again for your great support in this forum.

However after an amount of time i was able to find another solution which fits more my very special needs after reading the following forum and blog entries and some experiments:

http://www.eclipse.org/forums/index.php/t/169684/
http://www.codetrails.com/blog/osgi-ify-your-tools-jar

What i now do is:

1. Create a dummy plugin with JavaFX (will not make it in the final product)

2. Mark this plugin as optional (it will not be loaded at startup e.g. in the PDE or will be exported in the final product).

3. Add to the classpath: external:$java.home$/lib/jfxswt.jar

Now the plugins will be compiled (because of the dummy plugin) and at runtime the required FXCanvas is available (external classpath) without a OSGI classpath hack (see link at the end) or JavaFX libraries in the ext directory.

I exported my product and JavaFX embedded in SWT runs fine.

Another solution instead of using the external classpath info (programmatic classpath hack) can be found here:

https://www.eclipse.org/forums/index.php/t/796871/






Re: jfxswt not on the classpath [message #1693791 is a reply to message #1403526] Tue, 28 April 2015 11:38 Go to previous messageGo to next message
Darren Hurt is currently offline Darren HurtFriend
Messages: 32
Registered: July 2009
Member
I tried to follow 2 with Eclipse Luna, but

1. I don't see the template you talk about when creating a new plug-in project.
2. No matter what dependencies I add to my project I cannot see FXCanvas from my project.

Any ideas? My needs are simple, and that is to access the contents of 'jfxswt.jar' (particularly FXCanvas) from within my plug-in, which considering that it is distributed with java 8 (albeit optional), should not be too hard. Of course I need it such that my built plug-in also works (not just when running from Eclipse).

Why is this so hard? There seem to be a lot of posts on this, and I think Eclipse should support JavaFX integration out of the box, without all of these extra hoops to jump through!

Thanks,
Darren Hurt


Re: jfxswt not on the classpath [message #1693792 is a reply to message #1403526] Tue, 28 April 2015 11:39 Go to previous messageGo to next message
Darren Hurt is currently offline Darren HurtFriend
Messages: 32
Registered: July 2009
Member
I tried to follow 2 with Eclipse Luna, but

1. I don't see the template you talk about when creating a new plug-in project.
2. No matter what dependencies I add to my project I cannot see FXCanvas from my project.

Any ideas? My needs are simple, and that is to access the contents of 'jfxswt.jar' (particularly FXCanvas) from within my plug-in, which considering that it is distributed with java 8 (albeit optional), should not be too hard. Of course I need it such that my built plug-in also works (not just when running from Eclipse).

Why is this so hard? There seem to be a lot of posts on this, and I think Eclipse should support JavaFX integration out of the box, without all of these extra hoops to jump through!

Thanks,
Darren Hurt
Re: jfxswt not on the classpath [message #1693798 is a reply to message #1693792] Tue, 28 April 2015 11:45 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Can you provide a screenshot of your JRE and Plugin-Classpath container
expanded.

Tom

On 28.04.15 13:39, Darren Hurt wrote:
> I tried to follow 2 with Eclipse Luna, but
> 1. I don't see the template you talk about when creating a new plug-in
> project.
> 2. No matter what dependencies I add to my project I cannot see FXCanvas
> from my project.
>
> Any ideas? My needs are simple, and that is to access the contents of
> 'jfxswt.jar' (particularly FXCanvas) from within my plug-in, which
> considering that it is distributed with java 8 (albeit optional), should
> not be too hard. Of course I need it such that my built plug-in also
> works (not just when running from Eclipse).
>
> Why is this so hard? There seem to be a lot of posts on this, and I
> think Eclipse should support JavaFX integration out of the box, without
> all of these extra hoops to jump through!
>
> Thanks,
> Darren Hurt
Re: jfxswt not on the classpath [message #1693801 is a reply to message #1693792] Tue, 28 April 2015 11:56 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
IIRC the problem is that jfxswt.jar is located in the ext classpath and Equinox is skipping it. With e(fx)clipse 1.2.0 you need to specify a vm parameter to register a hook, that is able to load the jar, with 2.0.0 you need to specify the vm parameter -Dorg.osgi.framework.bundle.parent=ext to tell Equinox to use the ext classpath.

There are some tutorials and blog posts that might help you linked here: https://wiki.eclipse.org/Efxclipse#External_Resources

Re: jfxswt not on the classpath [message #1693811 is a reply to message #1693801] Tue, 28 April 2015 13:07 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
No jfxswt.jar is on NO classpath at all!

Tom

On 28.04.15 13:56, Dirk Fauth wrote:
> IIRC the problem is that jfxswt.jar is located in the ext classpath and
> Equinox is skipping it. With e(fx)clipse 1.2.0 you need to specify a vm
> parameter to register a hook, that is able to load the jar, with 2.0.0
> you need to specify the vm parameter
> -Dorg.osgi.framework.bundle.parent=ext to tell Equinox to use the ext
> classpath.
>
> There are some tutorials and blog posts that might help you linked here:
> https://wiki.eclipse.org/Efxclipse#External_Resources
>
>
Re: jfxswt not on the classpath [message #1693898 is a reply to message #1693798] Wed, 29 April 2015 08:50 Go to previous messageGo to next message
Darren Hurt is currently offline Darren HurtFriend
Messages: 32
Registered: July 2009
Member
Here is the current set up I'm trying.
I installed the minimal OSGI integration bundle from the update site (tell me if I need anything else), included the system property in the vm arguments (as specified) added the dependency and imported package in the manifest, and updated the class-path of my plug-in via PDE tools. Still can't get it to see FXCanvas. If I look in the org.eclipse.fx.javafx I can find the package, but it contains a dummy.tx and a dummy.class.

Plugin dependencies: index.php/fa/21687/0/
JRE_DEP: index.php/fa/21688/0/
Eclipse Ini: index.php/fa/21689/0/
Installed Features: index.php/fa/21690/0/
Plug-in Manifest: index.php/fa/21691/0/
Re: jfxswt not on the classpath [message #1693906 is a reply to message #1693898] Wed, 29 April 2015 09:08 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi,

a) This feature should not have been installed to your IDE but should
have gone to your target platform or is your target platform the
running IDE?

b) your modification to the eclipse.ini is not necessary this only
modifies your host eclipse

c) You still miss the e(fx)clipse tooling who enhances the PDE
Classpath container to include jfxswt.jar hence it is not there

d) the org.eclipse.fx.javafx is only a fake bundle with no classes
because they will be loaded from the JRE at runtime with the help of
Adapter Hooks

So you have 2 choices:
a) you modify the JRE in your Eclipse install and add jfxswt.jar
=> I think you then also have to fix the accessibility rules

b) you install the complete e(fx)clipse tool suite which includes a
CSS-Editor who know JavaFX CSS properties, an FXML-Editor, ... which
you called bloat but I think you'll find out very soon are really
needed or you go back to a world where you have the HTML-Doc open
next to your IDE

if you go for a) I'm unable to help if this is not working immediately
because this is out of scope of e(fx)clipse.

Tom


On 29.04.15 10:50, Darren Hurt wrote:
> Here is the current set up I'm trying.
> I installed the minimal OSGI integration bundle from the update site (tell me if I need anything else), included the system property in the vm arguments (as specified) added the dependency and imported package in the manifest, and updated the class-path of my plug-in via PDE tools. Still can't get it to see FXCanvas. If I look in the org.eclipse.fx.javafx I can find the package, but it contains a dummy.tx and a dummy.class.
>
> Plugin dependencies:
> JRE_DEP:
> Eclipse Ini:
> Installed Features:
> Plug-in Manifest:
>
Re: jfxswt not on the classpath [message #1693927 is a reply to message #1693906] Wed, 29 April 2015 10:34 Go to previous messageGo to next message
Darren Hurt is currently offline Darren HurtFriend
Messages: 32
Registered: July 2009
Member
I am not sure you understand what I am trying to do. let me try and elaborate further.

I am the author of a suite of plug-ins used to develop on a proprietary platform where I cannot include lots of extras stuff that people do not need. The end users (developers of business applications) have no need to be able to work with Java FX in my Eclipse based IDE product that they are using, and hence the extra wizards and capabilities etc. are not something I am willing to add. They use a fixed suite of plug-ins and a fixed set of technologies (that do not include JavaFX).

For example, I certainly don't want to be dragging in XText, Xtend etc. just for the needs of a language for specifying FX screens which they don't even need or use. I just need the ability to use JavaFX screens in my plug-ins. In fact I can use the SWT browser widget instead, but i wanted to compare and see which works best for me (it was WebView I was interested in).

To clarify, no JavaFX capabilities are needed by them, only by me in the plug-ins to display some stuff to them.

In fact they use GWT to create end user screens, and hence the CSS editor provided by Google is what they need, and I do NOT want a JavaFX specific one taking over the .css file association Smile

The way I work is that I generally prefer to install the plug-ins that will be included in the final product and work against the 'Runtime' target platform. I realise I can use custom target platforms instead, but I prefer not to. It is perfectly valid to use the default 'Runtime' target platform, so I do not understand why you are getting hung up on that point. In fact I tried a custom target platform and got exactly the same result. Either way it is not why it isn't working.

If it is the Eclipse plug-ins development Eclipse that needs to resolve the jfxswt.jar then surely it is that which needs the system property in the eclipse.ini?

Does this make my set-up and goals clearer to you?










Re: jfxswt not on the classpath [message #1693929 is a reply to message #1693927] Wed, 29 April 2015 10:46 Go to previous messageGo to next message
Darren Hurt is currently offline Darren HurtFriend
Messages: 32
Registered: July 2009
Member
In trying just to take the IDE-PDE feature it seems to want to include Xtext, Xtext UI and Xtend. I know about the whole Xtext language infrastructure generation stuff and the Xtend JavaVM language that is an example of it etc. etc., and I certainly don't want or need it for my product. It'd be nice if there was a smaller feature that just included enough to be able to use JavaFX in plug-in development. I am sorry I used the word bloat. that was unfortunate and I can see that might offend. It's just that in my case I do have valid reasons to just want a very limited ability to use JavaFX in plug-ins code, and hence just really want the minimal 'class-path manipulation' part of e(fx)clipse.
Re: jfxswt not on the classpath [message #1693935 is a reply to message #1693927] Wed, 29 April 2015 11:44 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
On 29.04.15 12:34, Darren Hurt wrote:
> I am not sure you understand what I am trying to do. let me try and
> elaborate further.
>

I very well understand what you are doing

> I am the author of a suite of plug-ins used to develop on a proprietary
> platform where I cannot include lots of extras stuff that people do not
> need. The end users (developers of business applications) have no need
> to be able to work with Java FX in my Eclipse based IDE product that
> they are using, and hence the extra wizards and capabilities etc. are
> not something I am willing to add. They use a fixed suite of plug-ins
> and a fixed set of technologies (that do not include JavaFX).
> For example, I certainly don't want to be dragging in XText, Xtend etc.
> just for the needs of a language for specifying FX screens which they
> don't even need or use. I just need the ability to use JavaFX screens in
> my plug-ins. In fact I can use the SWT browser widget instead, but i
> wanted to compare and see which works best for me (it was WebView I was
> interested in).


So you are the only one who has to install the e(fx)clipse tooling -
your users don't have to, they really only need the minimum feature.

>
> To clarify, no JavaFX capabilities are needed by them, only by me in the
> plug-ins to display some stuff to them.

Right hence they don't need the e(fx)clipse tooling themselves but you
as a developer need it. Similar to maybe other development time tools
like findbugs you use while developing the plug-ins.

>
> In fact they use GWT to create end user screens, and hence the CSS
> editor provided by Google is what they need, and I do NOT want a JavaFX
> specific one taking over the .css file association :)

We are NOT taking over the .css association but only if we detect the
that content is containing javafx stuff but I repeat your users DON'T
HAVE TO HAVE our tooling installed.

>
> The way I work is that I generally prefer to install the plug-ins that
> will be included in the final product and work against the 'Runtime'
> target platform. I realise I can use custom target platforms instead,
> but I prefer not to. It is perfectly valid to use the default 'Runtime'
> target platform, so I do not understand why you are getting hung up on
> that point. In fact I tried a custom target platform and got exactly the

This is going against any advice how do you get a headless build running
then?

> same result. Either way it is not why it isn't working.
>
> If it is the Eclipse plug-ins development Eclipse that needs to resolve
> the jfxswt.jar then surely it is that which needs the system property in
> the eclipse.ini?

No you are not understanding that correctly: The system property only
modifies the RUNTIME classpath and has NOTHING to do with compile time -
you users have to specify this or if you install your features through
p2 into an eclipse install p2 will create an extra entry in config.ini.

Tom
Re: jfxswt not on the classpath [message #1693953 is a reply to message #1693935] Wed, 29 April 2015 13:07 Go to previous messageGo to next message
Darren Hurt is currently offline Darren HurtFriend
Messages: 32
Registered: July 2009
Member
Ok, finally I think I see what I need. It's a while since I changed the build of my product so I'd kind of forgotten that I don't build everything into it, so that's my mistake (sorry about that) Smile.
Still, I don't really want XText, Xtend etc. even there, but I can tolerate it. I still think there's a case for a bit of re-factoring for a more basic product with just the class-loader magic though Smile.
Let's not get into arguments about build methodologies, technology, testing, general software practice. It is utterly pointless.

I probably should set-up a target platform, but not doing so hasn't caused me any grief over the many years I've been working in Eclipse plug-ins. I guess it will clarify the distinction between the contents of the product and the development plug-ins, so I agree that it's worth doing. Not totally necessary though as I specify elsewhere the totality of what goes into the product. It isn't the reason for stuff not working though, but rather that reason is me not installing the bit that does the class-loader magic.
I build with PDE tools within Eclipse, which works just fine for my purposes. I actually don't do headless builds, so I'm sure I offend those who subscribe to standard ways of doing everything (and I do not care about that) . However, I am the sole developer, designer etc., so such formalities are much less important than they are across large teams.

In light of what you've said, I think the following will likely work:

1. I install full tools in my plug-ins Eclipse.
2. I only build the minimal feature (is this the minimal OSGI feature thing?) into my product.
3. My product needs the vm argument in it's .ini file.


Thanks for your help. I will let you know if it works out (or even if not).






Re: jfxswt not on the classpath [message #1696377 is a reply to message #1693953] Tue, 26 May 2015 08:36 Go to previous message
Marcel Austenfeld is currently offline Marcel AustenfeldFriend
Messages: 160
Registered: July 2009
Senior Member
I did not follow this discussion for a while. But I still want to note that my described
prodecure works very fine in a product based Eclipse RCP (PDE export, see below).

Maybee I have to add that the dummy plugin must be deselected at runtime (e.g., test)
to use the JRE Jfxswt.jar (and of course after the export).

However I recommend to use the tools from Tom which are better suited and painfree for a more general RCP, plugin, etc. approach to produce JavaFX views with a fantastic JavaFX toolset.

With the way I described I integrated the SceneBuilderKit into an RCP product to create, compile and run (at runtime) JavaFX custom GUI's with my own implementation at RCP runtime:

Youtube Video:

https://www.youtube.com/watch?v=nO9H-iy-lvk

http://bio7.org/wp-content/uploads/2015/05/scenebuilder.jpg




Previous Topic:Mars release is approaching
Next Topic:AdapterFactoryObservableList not responsive to changes in the underlying model ?
Goto Forum:
  


Current Time: Thu Mar 28 20:47:57 GMT 2024

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

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

Back to the top