1
votes

I've create a Jar file with eclipse, and I want it to be launch each day at a specific time, when I double click on it, it work fine, but when I try to launch it with the windows "scheduled task", it do nothing. I've try many things in the scheduled task like "C:\Program Files\Java\jre1.8.0_91\bin\javaw.exe" with option : "-jar C:....\Myjar.jar" or also a .bat file which throw my jar, but same result ...

1
is the path C:....\Myjar.jar in a profile folder? If yes, the scheduled task must specify user name / password to see it - mjn

1 Answers

2
votes

Check if you have Java added to your path running this on the command line:

java -version

It should say something like:

java version "1.8.0_91"
Java(TM) SE Runtime Environment (build ...)
Java HotSpot(TM) 64-Bit Server VM (build ...)

If it doesn't, add java to your path environment variable.

Once this is done, it should be as easy as doing:

java -jar C:\path\to\your\app.jar