Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 529781 - -vmargs (from eclipse.ini) and platform jvm flags should be merged not selected.
Summary: -vmargs (from eclipse.ini) and platform jvm flags should be merged not selected.
Status: CLOSED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Launcher (show other bugs)
Version: 4.8.0 Photon   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: swtWaylandLauncher
  Show dependency tree
 
Reported: 2018-01-12 17:27 EST by Leo Ufimtsev CLA
Modified: 2018-01-17 12:25 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leo Ufimtsev CLA 2018-01-12 17:27:18 EST
There is a subtle bug in the launcher that's affecting the parent task.

Currently in eclipse.ini, the '-vmargs' *overrides* the platform-specific flags found in eclipseGtk.c/eclipseCocoa.c/(eclipseWin.c) in the argVM_JAVA [] variable.

Because of this, platform-specific flags are not set/propogated to jvm properly.

It was gone unnoticed because on win/gtk no platform specific flags were used. On cocoa "-XstartOnFirstThread" is used, but the flag is added to cocoa's eclipse.ini, (from what I gather this is a workaround), so it not being added from eclipseCocoa.c has gone unnoticed.

The solution is to *merge* -vmargs and platform specific args.
Currently, the only functional impact it will have is that on cocoa it will add "-XstartOnFirstThread" to any given args. But this isn't an issue because I know that specifying "-XstartOnFirstThread" multiple times is not an issue.
(With that said, the default eclipse.ini should remove "-XstartOnFirstThread" to reduce redunancy. Btw, I notice this flag is listed twice in the default eclipse.ini on OS X).

I.e, solution doesn't break anything. I tested/verified with incomming patch that eclipse.ini args are still passed on and platform specific args are now added.

Moving forward, we will need this functionality so that I can pass platform-specific system properties to SWT on gtk (namely SWT.GDBus), so that SWT knows it's being launched from Launcher. This is to replace X11 atoms/window properties.

~Patch incomming.
Comment 1 Eclipse Genie CLA 2018-01-12 17:28:55 EST
New Gerrit change created: https://git.eclipse.org/r/115337
Comment 2 Leo Ufimtsev CLA 2018-01-17 12:25:27 EST
As per discussion, an alternate approach will be used. 
"#ifdef LINUX", which will be part of parent patch. Closing this guy for now.