Dear pdfbox developers/maintainers,

Sorry that the previous email is incomplete...

For my project I need to highlight pdfs. The class
org.apache.pdfbox.examples.util.PDFHighlighter in PDFBox java project is
interesting to me. However, I could not call the class successfully after I
build the project. The error I got was

Error: Could not find or load main class org.apache.pdfbox.examples.
util.PDFHighlighter

The screenshot below shows the operation process:

$mvn clean install -DskipTests
  project was successfully installed
$cd pdfbox/examples/target/classes/org/apache/pdfbox/examples/util/
$ ls

DrawPrintTextLocations.class PDFHighlighter.class PrintImageLocations.class
PrintTextLocations.class

ExtractTextByArea.class PDFMergerExample.class PrintTextColors.class
RemoveAllText.class

$ java PDFHighlighter

Error: Could not find or load main class PDFHighlighter


Then I tried:

$cd pdfbox/examples/target/

$ls

META-INF maven-status

classes org

generated-sources pdfbox-examples-3.0.0-SNAPSHOT-sources.jar

generated-test-sources maven-archiver test-classesmaven-shared-
archive-resources

$unzip pdfbox-examples-3.0.0-SNAPSHOT-sources.jar

$java -cp pdfbox-examples-3.0.0-SNAPSHOT.jar
org.apache.pdfbox.examples.util.PDFHighlighter

Error: Could not find or load main class
org.apache.pdfbox.examples.util.PDFHighlighter



I can not figure out why the class could not be found. Could you please
check?


Best,

Weili

2018-01-05 11:04 GMT+01:00 Weili Lin <[email protected]>:

> Dear pdfbox developers/maintainers,
>
> For my project I need to highlight pdfs. The class PDFHighliter in PDFBox
> java project is interesting to me. However, I could not call the class
> successfully after I build the project. The error I got was
>
> Error: Could not find or load main class org.apache.pdfbox.examples.
> util.PDFHighlighter
>
> The screenshot below shows the operation process:
>
> $mvn clean install -DskipTests
>   project was successfully installed
> $cd pdfbox/examples/target/classes/org/apache/pdfbox/examples/util/
> $ ls
>
> DrawPrintTextLocations.class PDFHighlighter.class
> PrintImageLocations.class PrintTextLocations.class
>
> ExtractTextByArea.class PDFMergerExample.class PrintTextColors.class
> RemoveAllText.class
>
> $ java PDFHighlighter
>
> Error: Could not find or load main class PDFHighlighter
>
>
> Then I tried:
>
> $cd pdfbox/examples/target/
>
> $ls
>
> META-INF maven-status
>
> classes org
>
> generated-sources pdfbox-examples-3.0.0-SNAPSHOT-sources.jar
>
> generated-test-sources maven-archiver test-classesmaven-shared-
> archive-resources
>
>
>
>
>
>

Reply via email to