Environment variable not replaced in JVM options when run

Help
Allan
2013-07-17
2013-07-17
  • Allan
    Allan
    2013-07-17

    Using Launch4J 3.0.2

    I have added this line to JVM options:
    -Dmyapp.blah="%MYBLAH%"

    The environment variable MYBLAH has a value on my test system (XP Pro).

    If I run the generated wrapper exe by double clicking on it, myapp.blah arrives as null.
    If I run the generated wrapper via the commandline, myapp.blah arrives with the correct value.
    If I create a shortcut to the generated wrapper exe and double click on it, myapp.blah arrives with the correct value.

    Any ideas how I can get the first case to work?

     
  • Allan
    Allan
    2013-07-17

    Never mind. It was a stupid error in my main() code; a misplaced bracket...