[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| [platform-dev] Eclipse Native Launcher Help Needed | 
Hi,
I opened this enhancement request:
  https://bugs.eclipse.org/bugs/show_bug.cgi?id=558832
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:
  https://bugs.eclipse.org/bugs/show_bug.cgi?id=546153
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?
Thanks,
Ed