简体   繁体   English

当我从Task Scheduler的bat文件中运行Java程序时,程序包不存在错误…但是当双击bat文件时它将运行

[英]package does not exist error when I run java program in a bat file from Task Scheduler… But It will run when a bat file double clicked

Shows an error running from task schedular 显示从任务计划运行的错误

显示从任务计划运行的错误

Runs perfectly by double clicking the bat file 双击bat文件即可完美运行

双击bat文件即可完美运行

Please give me suggestions to run the bat file from task scheduler.... Thanks in Advance 请给我建议从任务计划程序运行bat文件。

When you double-click, the process executes in the same directory as the file you clicked. 双击时,该过程在与您单击的文件相同的目录中执行。 You need to tell the Task Scheduler what working directory you want. 您需要告诉任务计划程序所需的工作目录。 Set it to the same as the batch file. 将其设置为与批处理文件相同。

It's very curious to both compile and execute the code via the scheduler. 通过调度程序编译和执行代码非常奇怪。 Surely you're going to deploy a JAR file, not source code? 您确定要部署JAR文件,而不是源代码吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM