tb96
tb96

Reputation: 265

Why does my jar can't open from the task Scheduler

I'm trying to start a jar after my login has proceeded. This action is performed by the Task Scheduler from Windows. When I run this jar from his own directory it works properly. When I'm logged in, the JVM gives me the following error: "Could not find main class" and the directory of my jar. I already set up the main class in the manifest.

Upvotes: 0

Views: 545

Answers (1)

iMysak
iMysak

Reputation: 2228

I can advise you to create .bat file with described classpath and else environments properties. Most popular problems with missed JAVA_HOME property.
.bat file with described JAVA_HOME will help you to avoid any such problems.

Another way — just check does JAVA_HOME are setted it your system env settings.

Upvotes: 1

Related Questions