Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-dev] Eclipse Native Launcher Help Needed


I opened this enhancement request:

Without something that would let an application (the installer) know the original value of the PATH before the native launcher has munged it, I don't think there is any way to determine which java will run by default and I think I need to know that in order to implement this request:

I need/want to know which java implementation Eclipse will use if the eclipse.ini does not contain a -vm option in order to avoid generating a -vm option in the eclipse.ini when this value simply hard-codes the system default (the Java that the native launcher will find anyway).   So in general I need/want a way to determine the system default Java on all supported OSes and currently I only have a hack that only works on Windows and only because the native launcher uses / instead of \ when it munges the PATH.

One way I can imagine to do that, as described in 558832, is if the native launcher provided the value of the PATH in some other environment variable that's exported to (available in) the launched application.   E.g., something like this, probably in eclipseMain.c:

  setenv("ORIGINAL_PATH", getenv("PATH"), 1);

But I don't know how I can contribute something in order make this happen.  I don't even know if this is really the best way or if this is even feasible.   Moreover, I don't know how the native launcher is built.

Can anyone help or offer alternative ideas or approaches?


Back to the top