I downloaded commons-net-1.2.2.tar.gz. On an HP-UX 11.11 system, I am able to uncompress the tar file and untar the library in the /tmp file. Where do I put this new commons-net-1.2.2 directory so I can use the library? I know that HP's SDK is located in the path /opt/java1.4. I have never really used a library other Sun's, so I am new to installing and configuring 3rd party Java libraries.
Once I get the the Jakarta Commons Net library in the right path. Do I access it by:
I had the same problem with the jakarta commons library, but on a PC system running Windows XP. I found from the Java API documentation that if you put third-party library .jar files in the ext directory, which on my system is C:\jdk\jre\lib\ext, the javac compiler will find them on the classpath automatically, so you can use import statements in your source code files as you described, just like with any other core java package. Perhaps there is an equivalent directory on your UNIX system?
At least, when I did this, it seems to work OK on my system. I didn't have to use the -classpath flag of javac to get the source to compile.