Inside the bat file, there is the following:
java -Ddatabase.host=127.0.0.1 -Xms128M -Xmx1024M com.temp.util.manual.serial.Assignment -folder C:\temp\ -destination C:\temp\out.csv
It is assumed that the -folder and -destination are passed to the main method of the destination class being called, but instead they are interpreted as VM Args.
I tried putting quotes around the parameters to no avail, and the search did not reveal an answer.
I get the following error:
Unrecognized option: -'destination' Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. Press any key to continue . . . @echo off setlocal EnableDelayedExpansion EnableExtensions set FILETYPE=%~n0 set CLASSPATH=jar1.jar set CLASSPATH=%CLASSPATH%;anotherjar.jar echo %CLASSPATH% java -DjobName=%FILETYPE% -Ddatabase.host=127.0.0.1 -Ddatabase.name=db1 -Ddatabase.username=user1 -Ddatabase.password=password1 -Xms128M -Xmx1024M com.temp.util.manual.serial.Assignment -folder C:\\temp\\ -destination C:\\temp\\out.csv call Cleanup.bat endlocal
java batch-file
lucas.bennett
source share