I created a ".bat" file and scheduled to run every 15 mins in windows 2008 server. In the ".bat" file i gave the following. When I try to run the bat file in command line, it works fine. IF i schedule it, it throws "could not find or load main class". Contents of the bat file are given below.Let me know if I am missing anything.
@echo off
javac -cp C:\foo\abc.jar;C:\foo\xyz.jar; sample.java
java -cp C:\foo\abc.jar;C:\foo\xyz.jar;. sample
pause
batfile is not what you expect.javacfails silently sincesample.javais not found, andjavathen fails noisily because the class is not there? Try deletingsample.classand running the.batfile from the scheduler to see if it gets compiled correctly.