On Feb 25, 2014, at 10:49 AM, David DeHaven <david.deha...@oracle.com> wrote:

> 
>>> 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.
>> 
>> Thanks.
> 
> 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 :)

I did sort of wonder if the launcher somehow started the JVM as a subprocess 
that doesn't get passed the environment variables?
It also occurred to me that if the launch parameters support this, I think 
runtime of java does, you could modify the launch code to pass current 
LSEnvironment env vars.
I'm not sure appbundler is actively supported?
There was another open source branch of that where you might make the 
enhancement, if it is a bug, and it can be fixed. Not entirely sure how active 
that project is either though.
If I look into the env vars anymore I'll try to check on that. 
I think I did get setting R_HOME to work last night, instead of hanging the app 
actually crashed. Any tricks to getting crash logs these days I might of missed?
Any java I do these days I pretty much target openjdk only.

Michael Hall

trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz

HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe

AppConverter convert Apple jvm to openjdk apps 
http://www195.pair.com/mik3hall/index.html#appconverter




Reply via email to