Run a jar file inside a batch file with Windows 7 Task schduler
Hi,
I have a batch file, which include the following command;
java -jar ExportPDFTool.jar Xml=D:\\Data\\XML\\VNM\\%FolderName% Xsl=D:\\Data\\BatchPrinting\\xsl Pdf=D:\\Data\\PDF\\VNM_Local_PDF\\%FolderName% Log=D:\\Data\\Log\\VNM\\%FolderName%_convert.log
When I setup the Windows 7 Task Schduler for the batch file, all the commands in the batch file run well but the system seem to ignore the java -jar command (I can not see the convert.log file).
Please kindly give me a help to find out problem.
Thanks.
Re: Run a jar file inside a batch file with Windows 7 Task schduler
Have you tested the batchfile in a command prompt window? Did it work there?
Re: Run a jar file inside a batch file with Windows 7 Task schduler
Quote:
Originally Posted by
kingnachi
Hi,
I have a batch file, which include the following command;
java -jar ExportPDFTool.jar Xml=D:\\Data\\XML\\VNM\\%FolderName% Xsl=D:\\Data\\BatchPrinting\\xsl Pdf=D:\\Data\\PDF\\VNM_Local_PDF\\%FolderName% Log=D:\\Data\\Log\\VNM\\%FolderName%_convert.log
When I setup the Windows 7 Task Schduler for the batch file, all the commands in the batch file run well but the system seem to ignore the java -jar command (I can not see the convert.log file).
Please kindly give me a help to find out problem.
Thanks.
1. first run your command from command prompt, if success than create batch file
2. check Java is in path
3. Check ExportPDFTool.jar has main class or not
If you are running Java program from Jar first time then you can also check How to create and execute JAR file in Java – Command line Eclipse Netbeans
Also let us know exact error you are getting, that would be helpful