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