Hi, thank you for reading this post!
According to the Java Trail "The Extension Mechanism", the installed extensions directory is "lib/ext" under JDK or JRE. And all you have to do is place third party JAR files in that directory, import the correct package and your program will compile and run.
It doesn't appear to be so.
I checked the ext directory with this command:
String extDirs = System.getProperty("java.ext.dirs");
It returns
C:\Program Files\Java\jre6\lib\ext; C:\Windows\Sun\Java\lib\ext
as the two directory. I placed third party JAR file in the "C:\Program Files\Java\jre6\lib\ext", as well as the "C:\Program Files (x86)\Java\jdk1.6.0_20\jre\lib\ext" directories. I proceed to compile and run my program. According to the Java Trail, this should work, but it didn't. It gave me an "ClassNotFoundException". So I had to resort to setting the CLASSPATH environment variable.
What is wrong? What else needs to be done for your program to access the JAR class files in the lib/ext under JRE or JDK?
Thanks in advance!
Eric