Home » Eclipse Projects » e(fx)clipse » Strange issue with e(fx)clipse 0.9.0
|
Re: Strange issue with e(fx)clipse 0.9.0 [message #1265826 is a reply to message #1265820] |
Thu, 06 March 2014 16:09 |
Thomas Schindl Messages: 6651 Registered: July 2009 |
Senior Member |
|
|
Somehow e(fx)clipse thinks you are running on JDK8 - there is no need to
modify any VM setting e(fx)clipse would have detected everything by itself.
jfxswt.jar has been factored out of jfxrt.jar in JDK8 so that swt
dependencies are not on the extension classpath.
Tom
On 06.03.14 16:57, Zoltan Ujhelyi wrote:
> Hi all,
>
> I recently tried to check out the latest GEF4 bits from its development
> repository that has some JavaFX dependencies that are solved by relying
> on the exported JavaFX packages provided by the e(fx)eclipse project.
>
> I tried to follow the documentation, and
> 1. Used recent Java 7 versions (1.7.0.40 and 1.7.0.51), both on OSX
> 2. I have added the jfxrt.jar to my JVM build path on the JVM
> configuration session
> 3. Installed e(fx)eclipse 0.9.0.201401250805
> 4. Restarted my Eclipse instance, and managed to compile and run the
> GEF4 code
>
> However, after I have restarted again my Eclipse instance, all projects
> with JavaFX dependencies were showing a very strange classpath error (I
> noticed exactly the same issue when using 1.7.0.40):
> The container 'Plug-in Dependencies' references non existing library
> '/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/jre/lib/jfxswt.jar'
>
>
> I tried to find out about this missing jar file, but the only thing I
> found about it that it was missing from a Java 8 pre-build recently.
>
> Can you give me some hint what am I doing wrong? I have really no idea
> what to check.
>
> Thanks in advance,
> Zoltán
|
|
|
Re: Strange issue with e(fx)clipse 0.9.0 [message #1265944 is a reply to message #1265826] |
Thu, 06 March 2014 19:28 |
Zoltan Ujhelyi Messages: 392 Registered: July 2015 |
Senior Member |
|
|
Hi Tom,
thanks for the very quick answer. I tried to find the issue on my computer, and it seems that something does not get installed correctly in case of my main environment: if I do not add the jfxrt.jar file to the JVM classpath, a lot of compile errors are introduced; after adding it everything works fine until I restart the environment.
Even stranger, when starting a runtime Eclipse from this Kepler-based instance, I turned on the class loader debug messages with the property efxclipse.osgi.hook.debug; and it worked on the happy path of FXClassLoader (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?id=0.9.0).
I have also installed e(fx)clipse into a new, Luna-based environment, where everything seems to be working out of the box.
Do you have any idea what might have gone wrong in my case, or should I simply create a clean environment and hope for the best?
Thanks again,
Zoltán
|
|
|
Re: Strange issue with e(fx)clipse 0.9.0 [message #1266287 is a reply to message #1265944] |
Fri, 07 March 2014 08:18 |
Thomas Schindl Messages: 6651 Registered: July 2009 |
Senior Member |
|
|
I have no idea :-( Is the problem reproduceable with our prebuilt
distros as well? See http://efxclipse.bestsolution.at/install.html
Tom
On 06.03.14 20:28, Zoltan Ujhelyi wrote:
> Hi Tom,
>
> thanks for the very quick answer. I tried to find the issue on my
> computer, and it seems that something does not get installed correctly
> in case of my main environment: if I do not add the jfxrt.jar file to
> the JVM classpath, a lot of compile errors are introduced; after adding
> it everything works fine until I restart the environment.
>
> Even stranger, when starting a runtime Eclipse from this Kepler-based
> instance, I turned on the class loader debug messages with the property
> efxclipse.osgi.hook.debug; and it worked on the happy path of
> FXClassLoader
> (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?id=0.9.0).
>
>
> I have also installed e(fx)clipse into a new, Luna-based environment,
> where everything seems to be working out of the box.
>
> Do you have any idea what might have gone wrong in my case, or should I
> simply create a clean environment and hope for the best?
>
> Thanks again,
> Zoltán
|
|
| | | | |
Re: Me Too: Strange issue with e(fx)clipse 0.9.0 [message #1271400 is a reply to message #1270980] |
Sat, 15 March 2014 02:41 |
Thomas Schindl Messages: 6651 Registered: July 2009 |
Senior Member |
|
|
The missing of jfxswt.jar indicates that the tool thinks it is seeing a
JDK8 install!
What is your JDK version?
Tom
On 13.03.14 18:10, Jim Klo wrote:
> Hi Zoltán,
>
> Thanks. I've been fiddling with installing uninstalling/installing
> e(fx)clipse, swapping VMS, modifying the target platform, and etc. with
> no success.
>
> Oddly, so I tried deleting the all the errors (I know sounds weird) then
> cleaning all projects. And the template Java FXPlugin project will work,
> but none of my own plugins will work - can't find javafx.scene.Parent.
> However in both projects, if I go look at the build path - they are both
> still looking for that jfxswt.jar.
>
> Best,
>
> - JK
>
|
|
| | |
Re: Me Too: Strange issue with e(fx)clipse 0.9.0 [message #1272738 is a reply to message #1271581] |
Tue, 18 March 2014 16:37 |
Jim Klo Messages: 49 Registered: September 2012 |
Member |
|
|
Thanks for you replies/help Tom!
Thomas Schindl wrote on Sat, 15 March 2014 11:01
I think i introduce a regression in 1.0.0 in this regard! I've hopefully
fixed it with https://bugs.eclipse.org/bugs/show_bug.cgi?id=430447 -
don't know for sure before I've produced the next snapshot build - will
report back once I can confirm this is fixed.
Yes, I think that was it. I've not tried your patch yet, however, removing the jfxrt.jar from lib/ext, upon your suggestion did the trick. Thanks.
Thomas Schindl wrote on Sat, 15 March 2014 11:01
> resolve. On top of that there's a lot of artifacts in the tree and list
> views that don't flush (items render multiple times on top of each
> other). I'm not convinced Java 8 is stable enough for us yet
> (considering as it is we're building an IDE for a logic language that's
> subject to frequent change).
> Thanks!
That's sounds bad - for me FX8 felt much more stable and mature. Does
this also happen in a pure FX or when using FXCanvas only? I don't think
you should wait until this gets fixed by itself but proactively report
this to Oracle by providing a test case.
Yes, I think once I get this installer to a base place I can fiddle with J8 more and figure out what the deal is. For one thing - I can't figure out the right way to load the FXML file in the FXViewPart in createFXScene:
@Override
protected Scene createFxScene() {
SplitPane queryPage = null;
FXMLLoader fxmlloader = new FXMLLoader(getClass().getResource( "/ravelayout.fxml"));
try {
// System.err.println("IS FX Thread? "+Platform.isFxApplicationThread());
queryPage = (SplitPane) fxmlloader.load();
queryController = (QueryController) fxmlloader.getController();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Scene scene = new Scene(queryPage);
scene.getStylesheets().add(getClass().getResource("/ravelayout.css").toString());
scene.getStylesheets().add(getClass().getResource("/com/sri/sunflower/fxquery/controls/PopupMenu.css").toString());
// ScenicView.show(scene);
return scene;
}
If I close the view and reopen it.. the call to fxmlloader.load() fails with a Not on an FX Thread exception. But even when the view does open the first time, it has issues with ListView - there's a lot of side-by-side lists and trees - click on one element the all the components reload their data; however it leaves behind a bunch of rendered artifacts now with Java8. Until I have a solution to loading the fxml file; the artifacts are a secondary concern - it could be one solution solves the other.
Thomas Schindl wrote on Sat, 15 March 2014 11:01
My suggestion is to make use of tycho which fully supports building
JavaFX2.2 apps without modifying your JRE setup.
Thanks, I've never used tycho, and have been searching for a way to do this - can you point me in the right direction to start down this?
|
|
|
Re: Me Too: Strange issue with e(fx)clipse 0.9.0 [message #1272752 is a reply to message #1272738] |
Tue, 18 March 2014 17:20 |
Thomas Schindl Messages: 6651 Registered: July 2009 |
Senior Member |
|
|
On 18.03.14 09:37, Jim Klo wrote:
> Thanks for you replies/help Tom!
>
> Thomas Schindl wrote on Sat, 15 March 2014 11:01
>> I think i introduce a regression in 1.0.0 in this regard! I've hopefully
>> fixed it with https://bugs.eclipse.org/bugs/show_bug.cgi?id=430447 -
>> don't know for sure before I've produced the next snapshot build - will
>> report back once I can confirm this is fixed.
>
>
> Yes, I think that was it. I've not tried your patch yet, however,
> removing the jfxrt.jar from lib/ext, upon your suggestion did the trick.
> Thanks.
>
> Thomas Schindl wrote on Sat, 15 March 2014 11:01
>> > resolve. On top of that there's a lot of artifacts in the tree and
>> list
>> > views that don't flush (items render multiple times on top of each
>> > other). I'm not convinced Java 8 is stable enough for us yet
>> > (considering as it is we're building an IDE for a logic language that's
>> > subject to frequent change).
>> > Thanks!
>>
>> That's sounds bad - for me FX8 felt much more stable and mature. Does
>> this also happen in a pure FX or when using FXCanvas only? I don't think
>> you should wait until this gets fixed by itself but proactively report
>> this to Oracle by providing a test case.
>
>
> Yes, I think once I get this installer to a base place I can fiddle with
> J8 more and figure out what the deal is. For one thing - I can't figure
> out the right way to load the FXML file in the FXViewPart in createFXScene:
>
>
> @Override
> protected Scene createFxScene() {
> SplitPane queryPage = null;
>
> FXMLLoader fxmlloader = new FXMLLoader(getClass().getResource(
> "/ravelayout.fxml"));
> try {
> // System.err.println("IS FX Thread?
> "+Platform.isFxApplicationThread());
> queryPage = (SplitPane) fxmlloader.load();
> queryController = (QueryController) fxmlloader.getController();
> } catch (IOException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
> Scene scene = new Scene(queryPage);
>
> scene.getStylesheets().add(getClass().getResource("/ravelayout.css").toString());
>
>
> scene.getStylesheets().add(getClass().getResource("/com/sri/sunflower/fxquery/controls/PopupMenu.css").toString());
>
> // ScenicView.show(scene);
> return scene;
> }
>
>
> If I close the view and reopen it.. the call to fxmlloader.load() fails
> with a Not on an FX Thread exception. But even when the view does open
> the first time, it has issues with ListView - there's a lot of
> side-by-side lists and trees - click on one element the all the
> components reload their data; however it leaves behind a bunch of
> rendered artifacts now with Java8. Until I have a solution to loading
> the fxml file; the artifacts are a secondary concern - it could be one
> solution solves the other.
The error you see at work is not that things get called on the wrong
thread but that if you close the first FXCanvas the fx-system is
shutting down.
Can you try setting Platform.setImplicitExit(false) yourself which
should fix the problem (or use the lastest nightly).
Another thing I see as a problem in your code is that you are not
setting the correct classloader to use so it should fail creating an
instance of your controller in a OSGi-Env.
>
> Thomas Schindl wrote on Sat, 15 March 2014 11:01
>> My suggestion is to make use of tycho which fully supports building
>> JavaFX2.2 apps without modifying your JRE setup.
>
>
> Thanks, I've never used tycho, and have been searching for a way to do
> this - can you point me in the right direction to start down this?
I think there are tutorials around - there would have been one yesterday
at EclipseConNA :-( I'll try to add a wizard to create a Eclipse-Plugin
setup with tycho similar to what you get executing the JavaFX => OSGi
Application one.
You can give that a try and see what the wizard generate to maybe
understand how to apply tycho.
Tom
|
|
| | |
Goto Forum:
Current Time: Wed Sep 25 01:48:29 GMT 2024
Powered by FUDForum. Page generated in 0.05491 seconds
|