Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » Running and exporting Tutorial 3 (Java8) problems
Running and exporting Tutorial 3 (Java8) problems [message #1087516] Thu, 15 August 2013 19:25 Go to next message
Yarden Livnat is currently offline Yarden Livnat
Messages: 4
Registered: August 2013
Junior Member
Hi,

I have encounter various problems getting Tutorial 3 to run and export on both a Mac and Windows

I'm using Java8 build 102 and the following problems persists on various installations of e(fx)clipse. In particular I've tried it with Kepler 4.3.0 from eclipse.org (setting both the ide and runtime to the nightly build update site) as well as using prebuild from the nightly builds (both 4.3.0 and Beta8-4.3.0). I've been using efxclipse with Java8 to develop JavaFX applications but I'm a newbi when it comes to E4.

Here is what I get:
a) I've created the e4 Media example from Tutorial 3 and set up the runtime environment.
b) right click on product.product.launch and selecting run-as works as expected on both Mac and Windows)

c) Now try to run the project from the product.product Overview panel ("Launch and Eclipse application")
On windows: runs as expected
On Mac: eclipse build and launch the application but nothing come up and nothing is printed to Console either. I can kill the process fro the Console view but that's all.

d) If I now try to run the application as in step b) above I get the same results, i.e. nothing. (again, only on the mac) even though it worked before I tried step c. It works fine on Windows

e) I tried to export the product from the Overview in product.product
On the Mac:
The exported folder seems to be fine but the Eclipse.app is broken. In fact it does not include the binary at all. Contents/MacOS contains only eclipse.ini
On Windows:
No eclipse.exe is created the rest of the folder seems to be fine.


Am I missing something?
Thanks,

Yarden
Re: Running and exporting Tutorial 3 (Java8) problems [message #1087546 is a reply to message #1087516] Thu, 15 August 2013 20:27 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5330
Registered: July 2009
Senior Member
On 15.08.13 22:06, Yarden Livnat wrote:
> Hi,
>
> I have encounter various problems getting Tutorial 3 to run and export
> on both a Mac and Windows
>
> I'm using Java8 build 102 and the following problems persists on various
> installations of e(fx)clipse. In particular I've tried it with Kepler
> 4.3.0 from eclipse.org (setting both the ide and runtime to the nightly
> build update site) as well as using prebuild from the nightly builds
> (both 4.3.0 and Beta8-4.3.0). I've been using efxclipse with Java8 to
> develop JavaFX applications but I'm a newbi when it comes to E4.
>
> Here is what I get: a) I've created the e4 Media example from Tutorial 3
> and set up the runtime environment.
> b) right click on product.product.launch and selecting run-as works as
> expected on both Mac and Windows)
>
> c) Now try to run the project from the product.product Overview panel
> ("Launch and Eclipse application") On windows: runs as expected
> On Mac: eclipse build and launch the application but nothing come up
> and nothing is printed to Console either. I can kill the process fro the
> Console view but that's all.
>

that is expected the launch config that has been created has special
flags for mac set else the eclipse launcher is grabing the event loop on
os-x and javafx can not be bootstraped. if you use the product file you
override the generated launch config and things fail.

> d) If I now try to run the application as in step b) above I get the
> same results, i.e. nothing. (again, only on the mac) even though it
> worked before I tried step c. It works fine on Windows

same answer than above

>
> e) I tried to export the product from the Overview in product.product
> On the Mac:
> The exported folder seems to be fine but the Eclipse.app is
> broken. In fact it does not include the binary at all. Contents/MacOS
> contains only eclipse.ini
> On Windows:
> No eclipse.exe is created the rest of the folder seems to be fine.

expected - you can not use the eclipse launcher because it will give you
the same problems than above.

if you bootstrap real application useing
http://wiki.eclipse.org/Efxclipse/Tutorials/Tutorial4 you'll notice
pom.xml are created and a build.xml if you first run the pom.xml in
releng and afterwards the build.xml you'll get an e4 app packaged as a
dmg which will hold a launcher exe, jre, ...

Tom
Re: Running and exporting Tutorial 3 (Java8) problems [message #1090091 is a reply to message #1087546] Mon, 19 August 2013 17:47 Go to previous messageGo to next message
Yarden Livnat is currently offline Yarden Livnat
Messages: 4
Registered: August 2013
Junior Member
Thanks for the quick reply Tom.

I suspected the problem was something of this sort but I haven't seen any mention of this pitfall. As a side question, Is it possible to tell Eclipse to use the config file you generated at the start or add the special flags to it's config?

Using the pom and build I was indeed able to run an application from inside Eclipse and export it as an DMG on the mac. However the exported application will not run. if I run it using 'open' in a terminal I get,
LSOpenURLsWithRole() failed with error -10810 for the file /Applications/CNome.app

I googled this error code and it seems to only say "unknown error". Though several people reported similar issues, I have not found a working solution. It seems to be related to running Java on a mac. I'm using OSX 10.8.4

Thanks,

Yarden
Re: Running and exporting Tutorial 3 (Java8) problems [message #1090105 is a reply to message #1090091] Mon, 19 August 2013 18:11 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5330
Registered: July 2009
Senior Member
On 19.08.13 19:47, Yarden Livnat wrote:
> Thanks for the quick reply Tom.
> I suspected the problem was something of this sort but I haven't seen
> any mention of this pitfall. As a side question, Is it possible to tell
> Eclipse to use the config file you generated at the start or add the
> special flags to it's config?
>

Not sure what you mean Equinox will always use the config.ini generated
no matter how you launch, unless you tell it otherwise.

> Using the pom and build I was indeed able to run an application from
> inside Eclipse and export it as an DMG on the mac. However the exported
> application will not run. if I run it using 'open' in a terminal I get,
> LSOpenURLsWithRole() failed with error -10810 for the file
> /Applications/CNome.app
>
> I googled this error code and it seems to only say "unknown error".
> Though several people reported similar issues, I have not found a
> working solution. It seems to be related to running Java on a mac. I'm
> using OSX 10.8.4
>

What version of Java? Java8uxxx or Java7uxxx? I'm on OS-X 10.8.4 as well
so I should be able to reproduce it.

Tom
Re: Running and exporting Tutorial 3 (Java8) problems [message #1090121 is a reply to message #1090105] Mon, 19 August 2013 18:36 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5330
Registered: July 2009
Senior Member
just in case you are don't know you can always launch the generated app
on the command line using

java -jar plugins/org.eclipse.equinox.launcher_$VERSION.jar

On 19.08.13 20:11, Tom Schindl wrote:
> On 19.08.13 19:47, Yarden Livnat wrote:
>> Thanks for the quick reply Tom.
>> I suspected the problem was something of this sort but I haven't seen
>> any mention of this pitfall. As a side question, Is it possible to tell
>> Eclipse to use the config file you generated at the start or add the
>> special flags to it's config?
>>
>
> Not sure what you mean Equinox will always use the config.ini generated
> no matter how you launch, unless you tell it otherwise.
>
>> Using the pom and build I was indeed able to run an application from
>> inside Eclipse and export it as an DMG on the mac. However the exported
>> application will not run. if I run it using 'open' in a terminal I get,
>> LSOpenURLsWithRole() failed with error -10810 for the file
>> /Applications/CNome.app
>>
>> I googled this error code and it seems to only say "unknown error".
>> Though several people reported similar issues, I have not found a
>> working solution. It seems to be related to running Java on a mac. I'm
>> using OSX 10.8.4
>>
>
> What version of Java? Java8uxxx or Java7uxxx? I'm on OS-X 10.8.4 as well
> so I should be able to reproduce it.
>
> Tom
>
Re: Running and exporting Tutorial 3 (Java8) problems [message #1090166 is a reply to message #1090121] Mon, 19 August 2013 20:02 Go to previous messageGo to next message
Yarden Livnat is currently offline Yarden Livnat
Messages: 4
Registered: August 2013
Junior Member
Quote:

just in case you are don't know you can always launch the generated app
on the command line using

java -jar plugins/org.eclipse.equinox.launcher_$VERSION.jar


This one does works on both build 97 and build 102.

Quote:

On 19.08.13 20:11, Tom Schindl wrote:
> On 19.08.13 19:47, Yarden Livnat wrote:
>> As a side question, Is it possible to tell
>> Eclipse to use the config file you generated at the start or add the
>> special flags to it's config?
>>
>
> Not sure what you mean Equinox will always use the config.ini generated
> no matter how you launch, unless you tell it otherwise.


You've indicated before that I can not use the Run/Debug (and in particualr from the .product.product panel) and that I have to use the popup menu on .product.product.lauanch . I was wondering if this can be changed. I also noticed that adding -clearPersistedState in the .product.product launching panel was not reflected in the .procduct.product.launch file and I had to manually add it to that file.

Quote:

>> Using the pom and build I was indeed able to run an application from
>> inside Eclipse and export it as an DMG on the mac. However the exported
>> application will not run. if I run it using 'open' in a terminal I get,
>> LSOpenURLsWithRole() failed with error -10810 for the file
>> /Applications/CNome.app
>>
>> I googled this error code and it seems to only say "unknown error".
>> Though several people reported similar issues, I have not found a
>> working solution. It seems to be related to running Java on a mac. I'm
>> using OSX 10.8.4
>>
>
> What version of Java? Java8uxxx or Java7uxxx? I'm on OS-X 10.8.4 as well
> so I should be able to reproduce it.
>
> Tom
>


hmm... I was working with Java8 build 97. However, I've just installed build 102 and now I can launch the app with no problems. Magic Smile

Many thanks Tom!
Re: Running and exporting Tutorial 3 (Java8) problems [message #1090210 is a reply to message #1090166] Mon, 19 August 2013 21:40 Go to previous message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5330
Registered: July 2009
Senior Member
On 19.08.13 22:02, Yarden Livnat wrote:
> Quote:
>> just in case you are don't know you can always launch the generated app
>> on the command line using
>>
>> java -jar plugins/org.eclipse.equinox.launcher_$VERSION.jar
>
>
> This one does works on both build 97 and build 102.
>
> Quote:
>> On 19.08.13 20:11, Tom Schindl wrote:
>> > On 19.08.13 19:47, Yarden Livnat wrote:
>> >> As a side question, Is it possible to tell
>> >> Eclipse to use the config file you generated at the start or add the
>> >> special flags to it's config?
>> >>
>> > > Not sure what you mean Equinox will always use the config.ini
>> generated
>> > no matter how you launch, unless you tell it otherwise.
>
>
> You've indicated before that I can not use the Run/Debug (and in
> particualr from the .product.product panel) and that I have to use the
> popup menu on .product.product.lauanch . I was wondering if this can be
> changed. I also noticed that adding -clearPersistedState in the
> .product.product launching panel was not reflected in the
> .procduct.product.launch file and I had to manually add it to that file.
>

Unfortunately you can not IIRC - the reason is that PDE is simply too
smart - or it thinks it is smart and e.g. sets -XstartOnFirstThread on
OS-X which is simply wrong when the application is a Swing or JavaFX one.

I also think the -clearPersisted state should not be put into the
..product because then the application built on your build-server and
distributed to your clients will also have this flag which you probably
don't want, right?

So there's no other possibility to editing the .launch-File. I'm always
checking in the .lauch-Files to our VCS because often for dev-time we
set extra flags and e.g. clearPersistedState is such one. We often also
have Mock-Bundles running while doing UI-Development so that we e.g.
don't have to login, fetch data from an in memory list, ... .

> Quote:
>> >> Using the pom and build I was indeed able to run an application from
>> >> inside Eclipse and export it as an DMG on the mac. However the
>> exported
>> >> application will not run. if I run it using 'open' in a terminal I
>> get,
>> >> LSOpenURLsWithRole() failed with error -10810 for the file
>> >> /Applications/CNome.app
>> >>
>> >> I googled this error code and it seems to only say "unknown error".
>> >> Though several people reported similar issues, I have not found a
>> >> working solution. It seems to be related to running Java on a mac. I'm
>> >> using OSX 10.8.4
>> >>
>> > > What version of Java? Java8uxxx or Java7uxxx? I'm on OS-X 10.8.4
>> as well
>> > so I should be able to reproduce it.
>> > > Tom
>> >
>
>
> hmm... I was working with Java8 build 97. However, I've just installed
> build 102 and now I can launch the app with no problems. Magic :)
> Many thanks Tom!
>

Glad it works.

Tom
Previous Topic:Install missing dependencies
Next Topic:DnD support?
Goto Forum:
  


Current Time: Sat Sep 20 00:09:17 GMT 2014

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

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