Application error if SystemRoot env variable is not properly on Win platform

Discussion in 'Java' started by prasanta123, Jul 28, 2010.

  1. prasanta123

    prasanta123 New Member

    Joined:
    Jun 26, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Hi all

    By default SystemRoot is set by windows OS and all processes inherits environment from the parent process (i.e. SystemRoot is set properly).

    However if you configure your environment for a process ):
    java.lang.Runtime.exec(String[] cmdarray, String[] envp);
    Then if cmdarray = new String[]{"..../cvm.exe"....}; and envp massive does not have string "SystemRoot=C:\WINDOWS".
    You will get application error:
    "The application failed to initialize properly (0xc0150004). Click on OK to terminate the application."

    Can anyone please suggest (please point to some documentation/site) if it is a must to specify "SystemRoot=C:\WINDOWS" in envp & if it is valid to get this application error
    or if it is a bug in our code?

    Regards
    Prasanta
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice