wood burning stoves*
The moose likes Java in General and the fly likes Exception while running the java program through run.bat file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Exception while running the java program through run.bat file" Watch "Exception while running the java program through run.bat file" New topic

Exception while running the java program through run.bat file

sumanta panda
Ranch Hand

Joined: Jun 23, 2008
Posts: 224
Dear All,
I have a standalone application which is running succesffully through eclipse ide.The main java program is manager.ProcessorManager.java file.I called same java file in the run.bat file.

My doubt is in the run.bat what is the meaning of manager.ProcessorManager VALIDATE %1.

But when i execute samething in my run.bat it is trowing exception.The exception message is

Exception in thread "main" java.lang.NoSuchMethodError: com.sun.org.apache.xerce
at com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfigu
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.reset(Ab
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Ab
at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(XS
at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(XS
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDOM(T
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transfor
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transfor
at processor.DataValidationProcessor.process(DataValidationProcessor.jav
at processor.DataValidationProcessor.run(DataValidationProcessor.java:16
at manager.ProcessorManager.processFile(ProcessorManager.java:454)
at manager.ProcessorManager.init(ProcessorManager.java:205)
at manager.ProcessorManager.main(ProcessorManager.java:102)

The run.bat is

Please suggest.

Thanks in advance.

Sumanta Panda
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 39478
How are you setting your CLASSPATH in the bat file? It looks as though you cannot gain access to a method. Have you changed the definition of any of the classes? If you look in the API documentation it might suggest you compiled your code against one version of the XML11Configuration class and now have a different version. You didn't tell us what was in your .bat file.
syruss kumar
Ranch Hand

Joined: Jul 23, 2009
Posts: 97
You have to set your lib files in your required file in the CLASSPATH while creating the batch file like this

echo "Launching Java Application..."
java -jar "location of java file"

put your required file in your lib folder and create a jar or set in the set path for the corresponding files

All search starts with beginner's luck and all search ends with victor's severly tested.
subject: Exception while running the java program through run.bat file