java - Environment variables passed by Runtime.exec(String) -


are environment variables of parent process(e.g. shell) available in environment in child process invoked using runtime.exec(command) run? had @ api documentation it's not specified there.

my use case this

mainscript.sh invokes java mainclass

mainclass invokes runtime.exec("hi.sh")

now, variable my_env set , exported in mainscript.sh available hi.sh?

ps: i'm aware of 2nd api takes explicit string[] envp.

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4064912 has vague info.

yes, why not?

from runtime documentation:

every java application has single instance of class runtime allows application interface environment in application running


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -