Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 445398 - Generated launcher from a .product file has wrong calculated VM arguments
Summary: Generated launcher from a .product file has wrong calculated VM arguments
Status: RESOLVED INVALID
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.4   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-29 15:15 EDT by Cristiano Gaviao CLA
Modified: 2014-10-03 08:29 EDT (History)
2 users (show)

See Also:


Attachments
the product definition file (14.35 KB, application/octet-stream)
2014-10-01 06:50 EDT, Cristiano Gaviao CLA
no flags Details
the generated launcher file (6.63 KB, application/octet-stream)
2014-10-01 06:53 EDT, Cristiano Gaviao CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cristiano Gaviao CLA 2014-09-29 15:15:21 EDT
I've created a .product file for a headless equinox application. I haven't any icon set in the launcher session of product file. I just changed the launcher name.

But when I click on the launch button I'm receiving the error below:

    Unrecognized option: -Xdock:icon=../Resources/Eclipse.icns
    Error: Could not create the Java Virtual Machine.
    Error: A fatal exception has occurred. Program will exit.

 
I found that the correspondent launcher are being created with these VM arguments:

    -Xms40m -Xmx512m -Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
Comment 1 Vikas Chandra CLA 2014-10-01 03:04:59 EDT
Can you attach a project file with .product file in which the launch could give this equivalent error?
Comment 2 Cristiano Gaviao CLA 2014-10-01 06:50:26 EDT
Created attachment 247522 [details]
the product definition file

Attached is the product definition file that I'm using. I tried that with Luna SR1 too.
Comment 3 Cristiano Gaviao CLA 2014-10-01 06:53:29 EDT
Created attachment 247523 [details]
the generated launcher file
Comment 4 David Williams CLA 2014-10-01 21:42:35 EDT
This seems pretty mysterious to me. I tried replicating with some extremely simple examples of my own, and my Linux machine never created a launcher for the Mac. 

Are the plugins and features ones that you wrote, and "know all about"?? I'm half wondering if any of them have some sort of filter or p2.inf file that says "these are for a Mac machine"? 

Another wild guess ... Are you working on a "pure" Linux machine? Or are you, by chance working on a virtual machine, which might, just to guess, be running on a Mac? 

The only thing about your product file that I was surprised (not) to see was that 
org.eclipse.equinox.executable was not listed a a pre-req feature. And since you had "contains native launchers" checked, that's usually how the eclipse launcher get's 'included' in a product -- only I'm still guessing ... there could be other ways to do it, perhaps it is "buried" in some of the features you have named, and I have just never seen it done that way before. 

Did you ever have this working, on a previous version of Eclipse? Or just so happened to start with Luna SR1? 

Another wild guess ... Are you working on a team, where someone else may have a Mac, and may have "shared" that launcher in one of the plugins/features? So you just happen to be checking it out of source control, and then "picking it up" by chance, since same project/product name? Or are you positive it does not exist, before you try to 'launch'?
Comment 5 Cristiano Gaviao CLA 2014-10-02 08:28:44 EDT
(In reply to David Williams from comment #4)
> This seems pretty mysterious to me. I tried replicating with some extremely
> simple examples of my own, and my Linux machine never created a launcher for
> the Mac.

To me either :)
> 
> Are the plugins and features ones that you wrote, and "know all about"?? I'm
> half wondering if any of them have some sort of filter or p2.inf file that
> says "these are for a Mac machine"? 
No p2.inf and the only ma

> 
> Another wild guess ... Are you working on a "pure" Linux machine? Or are
> you, by chance working on a virtual machine, which might, just to guess, be
> running on a Mac? 
I had a mac but this current machine is with a pure linux

> 
> The only thing about your product file that I was surprised (not) to see was
> that 
> org.eclipse.equinox.executable was not listed a a pre-req feature. And since
> you had "contains native launchers" checked, that's usually how the eclipse
> launcher get's 'included' in a product -- only I'm still guessing ... there
> could be other ways to do it, perhaps it is "buried" in some of the features
> you have named, and I have just never seen it done that way before. 
correctly I created my own narrow feature for a server installation containing just some bundles. 

> 
> Did you ever have this working, on a previous version of Eclipse? Or just so
> happened to start with Luna SR1? 
actually, inside IDE I just used to check for product validation,as I'm building it with tycho. after it is ok I run it externally. So the faced problem is only inside IDE.

> 
> Another wild guess ... Are you working on a team, where someone else may
> have a Mac, and may have "shared" that launcher in one of the
> plugins/features? So you just happen to be checking it out of source
> control, and then "picking it up" by chance, since same project/product
> name? Or are you positive it does not exist, before you try to 'launch'?
yep, all my coworkers has a mac. that is the reason that I have questioned later if that VM args would come only from the product file or another source. I will double check the shared artifacts.

many thanks
Comment 6 Cristiano Gaviao CLA 2014-10-03 08:29:44 EDT
finally I found the culprit! 

I've created different target platform definition files (one for each development environment that we are using) but the Linux one was contaminated by the VM arguments of the /MacOs file.

So it is, PDE uses info from the current target platform plus the .product file in order to create the launch file for the desired product.