I'm having a problem with a java code. I use a .jar that I import into the class I want to program but the problem is that I get an error with a data type incompatibility when executing the code it throws an error of:
null pointer exception
The data type Element
gives me problems.
The problem is in the last assignment
package extract;
import java.io.FileInputStream;
import java.io.InputStream;
import org.jdom.Element;
import pl.edu.icm.cermine.*;
public class Extract {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws Exception{
PdfNLMContentExtractor extractor= new PdfNLMContentExtractor();
InputStream inputStream = new FileInputStream("/home/paul/cermine/sample2.pdf");
Element result=extractor.extractContent(inputStream);
System.out.println(result);
}
// TODO code application logic here
}
This is my java class in the result variable should store the metadata of the pdf that is passed in the address but on the contrary the result is:
run:
Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - cannot find symbol
symbol: class Element
location: class extract.Extract
at extract.Extract.main(Extract.java:28)