java.exe MyClass flavour=strawberry
set flavour=strawberry java.exe MyClass %flavour%
System property flavour with value "strawberry " will be accessible via System.getProperty("flavour"); Make sure you put the -D before your classname or else you will find "-Dflavour=strawberry " appearing at arg[0] instead. Contrary to rumour, this feature is also available in Java version 1.6. Make sure you use an upper case
set flavour=strawberry java.exe -Dflavour=%flavour% MyClass
| You can get the freshest copy of this page from: | or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror) | |
| http://mindprod.com/jgloss/getenv.html | J:\mindprod\jgloss\getenv.html | |
![]() | ||
| Canadian Mind Products | ||
| mindprod.com IP:[65.110.21.43] | ||
| view Blog | Your face IP:[38.107.191.110] | |
| Feedback | You are visitor number 14,498. | |