Java – I encountered this exception: an unresolved compilation problem
I removed the jar from the project( pdf@R_157_2419 @, bouncy castle, etc.) and move them to another folder, but I get this exception after I include them in the build path
On the first line, eclipse shows this error (the constructor pdfparser (InputStream) references the missing type InputStream) - altought FileInputStream is extended from InputStream - 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
**
Solution
This just means that your project is not compiled, but you still try to run it Eclipse allows you to do this and only fails the first time you try to call something that cannot be compiled correctly
Look at compilation errors in your project to track down real problems It seems strange that it can't find the InputStream: did you delete a bunch of import statements from the code at the same time?