wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Batch file will not run Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Batch file will not run" Watch "Batch file will not run" New topic
Author

Batch file will not run

Jennifer Sohl
Ranch Hand

Joined: Feb 28, 2001
Posts: 455
We have an app that our users are running from an icon on their desktop that points to a batch file.
For some reason now, the program does not run. It just brings up the DOS prompt, and then says 'pause'. Nothing has been changed in the batch file. I have no idea why it is doing this. Could someone give me a clue what to look for?
Thanks a million!
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
What's in the batch file Jennifer? Could it be that some resource (another bathfile or application?) that the batch file depends on has recently changed or been removed?


Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Jennifer Sohl
Ranch Hand

Joined: Feb 28, 2001
Posts: 455
:: start of bat file
set classpath=Y:\VSK Java Programs;c:\j2re1.4.1_01\bin;Y:\VSK Java Programs\jt400\lib\jt400.jar
javaw com.storekraft.ord.CVOrderEntry
pause
:: end of bat file
Above is the contents of the batch file. The only thing that I did, was made a change to a class, and copied the class file into the package that the batch file is looking at.
I tried running the program from TextPad after I made the change and no errors came up.
Is there any way I can make DOS print out what the problem is?
Thanks!
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
It's been a while since I did any serious batch file writing, but I think something like:
Joel McNary
Bartender

Joined: Aug 20, 2001
Posts: 1817

Also, try java instead of javaw in the batch. If there is some problem in the code you will then be able to look at the command prompt to see what it might be.
Once you get it working, you can switch back to javaw.


Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Jennifer Sohl
Ranch Hand

Joined: Feb 28, 2001
Posts: 455
Thanks for the tip. I forgot I could use java vs. javaw. Found out I was getting a NoSuchMethod error. I had forgot to copy over a class file that was associated with the one I changed.
Thanks for all of your help!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Batch file will not run