david.dehaven at oracle.com
Tue Feb 25 08:49:58 PST 2014
>> Requiring R_HOME to be set in the environment seems sketchy to me. At worst you should be able to set it through a system property, not rely on the environment. Is it open source? Maybe it could be fixed and contributed back.
>> The ugly workaround might be to drill down through JNI to call setenv, if it can be done early enough.
> Given LSEnvironment not seeming to work at all. I should probably set up some other test cases and see if this seems to hold consistently.
> But given that, I am already considering the workarounds. The property is required by the native code, getenv(), where System.property not quite as preferred as in Java? Anyhow, current efforts on the 'ugly workaround'. Somehow do a setenv myself.
If you can't get it set early enough and you're rolling your own app bundle, you could grab the JavaAppLauncher source in OpenJDK and modify it so the environment gets set up before the JVM is started. The downside is you'll no longer be compatible with Java 6 (not a bad thing, IMHO :)
More information about the macosx-port-dev