Hi
I have one file (transfoPO.java) which call classes from a jar file. it compiles well but at runtime i have an error
Exception in
thread main java.lang.NoSuchMethodError : main
Here's my file
//
Java import java.io.*;
// Fop
import org.apache.fop.apps.*;
// Sax
import org.xml.sax.XMLReader;
import org.xml.sax.InputSource;
class transfoPO
{
public static int nbpage;
// Main method
public static void main(){
Driver driver = new Driver();
File filexml = new File("invoicetest.xml");
File filexslt = new File("xsltransfo1.xsl");
/*first processing to know how many pages the invoice has*/
/* call Fop classes */
try{
driver.setRenderer(Driver.RENDER_PDF);
InputHandler inputhandler = new XSLTInputHandler(filexml,filexslt);
XMLReader parser = inputhandler.getParser();
InputSource inputsource = inputhandler.getInputSource ();
driver.buildFOTree(parser,inputsource);
driver.format();
driver.setOutputStream(new FileOutputStream("essai.pdf"));
driver.render();
}
catch(Exception e) {
System.out.println("erreur" +e);
}
...
}
it is compiling with the command
javac -classpath sourcesfop\Fop-0.19.0\fop.jar transfoPO.java
and i run it with
java -cp sourcesfop\Fop-0.19.0\fop.jar;. transfoPO
Do you know what is the problem??
in the jar file there is a class which has a method main too but i don't use it. is this one interfere with my main method?
thanks for your help
E