I get this exception after i removed from my project the jars (pdfbox ,bouncycastle etc) and moved them to another folder but i included them in the build path ...
at the first line eclipse shows this error( the constructor PDFParser(InputStream) refers to missing type InputStream) -altought FileInputStream is extended from InputStream- and i don't know why?
FileInputStream in = new FileInputStream(path);
PDFParser parser = new PDFParser(in);
PDFTextStripper textStripper = new PDFTextStripper();
parser.parse();
String text = textStripper.getText(new PDDocument(parser.getDocument()));
any ideas? **
Exception in thread "AWT-EventQueue-0" java.lang.Error: Unresolved compilation problems:
The constructor PDFParser(InputStream) refers to the missing type InputStream
The constructor PDFTextStripper() refers to the missing type IOException
The method parse() from the type PDFParser refers to the missing type IOException
The method getText(PDDocument) from the type PDFTextStripper refers to the missing type IOException
The method getDocument() from the type PDFParser refers to the missing type IOException
The method getDocument() from the type PDFParser refers to the missing type IOException
The method close() from the type COSDocument refers to the missing type IOException
**
error: unresolved compilation problem: usually occurs due to syntax or typographical errors. Also, you might get the same exception due to using unknown or undefined classes and modules. Surprisingly, this article will let you know about all the possible causes in detail.
This means that your project isn't setup to include the JUnit libraries when it compiles; JUnit is not included in the Java runtime libraries (JRE System Library) so you have to add it to the build path.
This is Thrown when the Java Virtual Machine attempts to read a class file and determines that the file is malformed or otherwise cannot be interpreted as a class file.
That just means your project hasn't compiled, but you've still tried to run it. Eclipse lets you do that, only failing when you first try to call something which didn't compile properly.
Look at the compilation errors in your project to track down the real problem. It does seem odd that it can't find InputStream
: did you remove a bunch of import statements from your code at the same time?
You may try a refresh on the project along with clean within eclipse (Project > Clean > All).
Greetz, GHad
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With