Writing a JAVA applet to implement a custom PDF viewer.

Q: I am developing using JAVA on Windows 2000/JSDK1.6

description: I downloaded the PDFNet Library and tried the PDFView
sample program (Java Version). I successfully compiled it but failed
to run. It shows the following message.

Exception in thread "main" java.lang.UnsatisfiedLinkError: no PDFNetC
in java.library.path

Can you tell me what is the problem and how can I fix it?

Can I use the library to create a java applet to view PDF files. The
applet must run on Windows but we may want to support Mac and Linux in
future.
-----
A: Did you try to run the sample using 'RunTest.bat' batch command?

You would need to open a command-line window and 'cd' into PDFNet/
Samples/PDFView/JAVA folder. Then type 'RunTest' and hit the enter
key.

Alternatively you can type:

javac -classpath .;../../../Lib/PDFNet.jar *.java java -
Djava.library.path=../../../Lib/ -classpath .;../../../Lib/PDFNet.jar
PDFViewMain

Please note that that error is caused because Java can't find
'PDFNetC.DLL' located in 'PDFNet/Lib' folder. To resolve this you can
either copy PDFNetC.DLL to a folder in the JAVA library path (in the
above sample the library path is specified using -Djava.library.path
option).

PDFNet can be used to implement custom JAVA applets for viewing PDF
files. If the applet needs to run in the browser you would need to
download a platform specific shared library (DLL on Windows, so on
Linux, and dylib on Mac) before executing the viewer. This download
would need to be performed only once (e.g. just after the applet is
downloaded). The applet can check waht is the OS it runs on and then
download a paltfrom specific shared library along with the resource
file ('pdfnet.res').