I'm packaging a relatively simple Java application in a "Per-machine" configuration on Windows 7. The classpath is straightforward, but I need user-specific directories/jars (i.e. path is dependent on who is logged in) added to the classpath as well. The files/directories would be relative to %LOCALAPPDATA%.
I've tried the following:
- Adding the folder in the "files/folders" screen and adding that folder to the classpath (classpath is then 'static' to the LAD of the admin who installed the package, regardless of who is logged in)
- Adding an environment variable with %LOCALAPPDATA% (%LOCALAPPDATA%\path\i\need) and using the "Env Var" option, but the environment variable doesn't resolve %LOCALAPPDATA% and is literal
- Using "Env Var" and type in "%LOCALAPPDATA%\path\i\need"
The last *looks* like it should work looking at the INI file. Running the app from the command line using java and the classpath copied/pasted from the INI file (so java -cp "%LOCALAPPDATA%\path\i\need;blah;blah"), everything works correctly. But when run with the regular EXE, it does not. (I've also verified with a small java program that does nothing but print the classpath; when run with java it prints the user-specific directory, but when run from the exe, it does not.
So... how exactly is the classpath portion in the INI file used/calculated, and how can I accomplish what I need?
Thanks!