Hi,
I'm getting an error when trying to invoke a .jar file from my Windows batch (.bat) file.
I get the following:
C:\j2sdk1.4.0\bin>java "Batch45Day.jar" BatchStandalone
Exception in thread "main" java.lang.NoClassDefFoundError: Batch45Day/jar
my question is - why I would get an error calling a .jar file that contains a class file that, when run by itself in the bat file, runs perfectly fine.
In other words, if I strip out the jar ref in the .bat file and only call the BatchStandalone class, it will run fine. Isn't it in essence the same thing?
If you're wondering why I wouldn't just run the class file itself within the batch file, I will, but ultimately I'm trying to get a class file to invoke a servlet, and I was under the impression that that could not be done, except bundled within a .jar file.
In other words, I need to have a scheduler (batch file) call a servlet to invoke a JSP, that will email someone a report daily.
Am I off the path here with this approach?