Make Java Run as Scheduled Task in XP - Problem in reading env user variable
I try to run a java application through scheduled task in XP :
at 11:00 /every:m,t,w,th,f,s,su cmd /c "C:\Projects\piko\dist\piko.jar" arg
I realize in piko.jar, it always read empty for
If I run it as normal application through command prompt,
java -jar C:\Projects\piko\dist\piko.jar arg
The environment variable is there.
May I know how can I resolve this?
Have you tried:
cmd /c "java -jar C:\Projects\piko\dist\piko.jar arg"
Otherwise you probably have to specify a username and password to use when you schedule the task... it might be that XP is running it under some internal/system account which has no associated "user", per se.