Reputation: 67
Hi Stackers!
I have a vendor's java application that I want to start from a batch file in window 2007.
The app boots fine from the shortcut, but it needs to kick off from a batch file.
My command looks like this when I run it out of the .exe directory:
start javaw.exe -param1 -param2 -param3 com.blah.blah.blah
But yeilds the following error:
"Java Virtual Machine Launcher Could not find the main class. Program will exit"
The application icon is appearing when this error is thrown, so the application is attempting to start.
Also there's a "Start in:" parameter in the shortcut that I don't know how to pass to the start command "C:\Program Files (x86)\Vendor Directory\Vendor Subdirectory\" & when this is removed from the icon properties then I get the same error.
Also tried svcutil and java commands but these commands yielded similar results...
Any help with this issues is greatly appreciated - Thanks!
Upvotes: 0
Views: 729
Reputation: 67
Well part of the issues was syntax!
Had to use procmon to figure that out.
But when I sent the command:
start "Vendor App Name" "C:\Program Files (x86)\Vendor Directory\Vendor Subdirectory\javaRt\bin\javaw.exe" -Param1 -Param1 -Param3 com.blah.blah
out of the directory C:\Program Files (x86)\Vendor Directory\Vendor Subdirectory\ it fired right up!
Thanks to everyones help & they folks who built procmon for helping me figure this out! :-)
Upvotes: 0
Reputation: 133
If JAVA is added to your class path simply go to the directory first where exe file from vendor exist. Your batch file will look like this:
cd "C:\Program Files (x86)\Vendor Directory\Vendor Subdirectory"
start javaw.exe -param1 -param2 -param3 com.blah.blah.blah
Upvotes: 1