a. I am hoping to run the PDFHighlighter as an example. After building using
Netbeans I am getting this error when I try to execute from the command
line.

C:\Projects\java\pdfbox-1.0.0\target\classes\org\apache\pdfbox\util>java
org.apache.pdfbox.util.PDFHighlighter
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/pdfbox/util/PDFHighlighter
Caused by: java.lang.ClassNotFoundException:
org.apache.pdfbox.util.PDFHighlighter
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: org.apache.pdfbox.util.PDFHighlighter.
Program will exit.

However under the IDE netbeans the message is:

run:
usage: java org.apache.pdfbox.util.PDFHighlighter <pdf file> word1 word2
word3 ...
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)

Should I be able to run PDFHighlighter from the commandline?

b. Related question - I searched but could not find any example where the
PDF pages are rendered to a window. Did I miss something?

Thanks for any help, srini

Reply via email to