jpackage: support for environment variables in --java-options

Michael Hall mik3hall at gmail.com
Tue Sep 1 23:08:09 UTC 2020



> 
> On macOS you need to set the variables differently, but I think it can still work. The variables known to your shell are not the same as those known to LaunchServices. For those use the launchctl command to set them. 
> 

I’m not that familiar with launchctl. Is this something the application user is expected to do? What experience I have had with applications and environment variables involved adding the entries to Info.plist. Making the environment variables normally available to the application as environment variables. 

My question is if there is or will be any kind of OS X support for this in jpackage? LSEnvironment settings in the Info.plist file. 

e.g. the following was what was recently mentioned on the javafx list…
https://github.com/fvarrui/JavaPackager <https://github.com/fvarrui/JavaPackager>
envPath

Defines PATH environment variable in GNU/Linux and Mac OS X startup scripts.


Otherwise, this seems to be getting a little confusing, for me anyhow, as to what you’re trying to do and when. Are you trying to use environment variables at build time to replace variables that will be resolved in the config file. Which seemed to be what Serban was asking. Or did I misunderstand that and Serban actually wants settings that will be resolved at application launch? 
Or do you want to use them at application launch time as some kind of mechanism to override config file settings there like jdk memory settings? Which seems to what the jdk issue concerned. 

My question seems simpler. I will let others resolve other environment variable usage at build or launch time. I am interested in runtime. 



More information about the core-libs-dev mailing list