I'm using PDFBox for a little project but I'm getting a package does not exist error when compiling. As for the IDE, I followed the instructions to add modules and was able to import them. I would appreciate some ideas to fix the issue. Thanks!
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.text.PDFTextStripper;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.Map;
import java.util.Scanner;
import static java.util.Map.entry;
public class TextAnalyser {
....
Output
./TextAnalyser.java:1: error: package org.apache.pdfbox.pdmodel does not exist
import org.apache.pdfbox.pdmodel.PDDocument;
^
./TextAnalyser.java:2: error: package org.apache.pdfbox.text does not exist
import org.apache.pdfbox.text.PDFTextStripper;
^
./TextAnalyser.java:38: error: cannot find symbol
PDDocument document = PDDocument.load(new File(fileName));
^
symbol: class PDDocument
location: class TextAnalyser
./TextAnalyser.java:38: error: cannot find symbol
PDDocument document = PDDocument.load(new File(fileName));
^
symbol: variable PDDocument
location: class TextAnalyser
./TextAnalyser.java:39: error: cannot find symbol
PDFTextStripper pdfStripper = new PDFTextStripper();
^
symbol: class PDFTextStripper
location: class TextAnalyser
./TextAnalyser.java:39: error: cannot find symbol
PDFTextStripper pdfStripper = new PDFTextStripper();
^
symbol: class PDFTextStripper
location: class TextAnalyser
6 errors
EDIT I solved by rebuilding. Post Package doesn't exist error in intelliJ