This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Hi ranchers. you know that we put the extra Jar files in the ext dir. I put Jars like : jdom.org, liquidlnf.jar, junit.org the problem is the JVM is loading every jars in this dir except for the look and feel jars.. in my main class, I wrote: ---------- UIManager.setLookAndFeel("com.birosoft.liquid.LiquidLookAndFeel"); ---------- the code is compiling fine, but when running it using the command: java MajorClass a ClassNotFoundException: com.birosoft.liquid.LiquidLookAndFeel is thrown... and if I wrote the command: java -cp .;%JAVA_HOME%\jre\lib\ext\liquidlnf.jar MajorClass the application works fine. so what is the problem?? is there any problem with the JVM? as I know, I should not point to the ext dir. should I reinstall the sdk??
Why do you feel the need to put jars in the ext directory? I have been programming in Java full-time for about 7 years or so and have NEVER had to put anything in the ext directory. Why not just add jars you need to the classpath dynamically? java -cp .\somejar.jar;.\someotherjar.jar SomeProgram Brian
"Need"??? The extension mechanism is so-o-o much cleaner than diddling around with the class path. I would also like to know why John had this problem. Does anybody know the answer?
The Inner that is named is not the true Inner.
Joined: Sep 29, 2003
"The extension mechanism is so-o-o much cleaner than diddling around with the class path"
I have never had a problem "diddling" with the classpath. The extension method is not clean/user-friendly when you distribute an app. You don't want to tell users to add jars to ther ext directory. This may not be relevant in your case since you may not be distributing your app, but every Java developer needs to understand and use the classpath effectively without adding jars to the ext dir. Just my (un-asked-for) opinion. I'll bow out now so maybe someone can answer your actual question. Brian PS - BANG! You've been shot. [ April 06, 2004: Message edited by: Brian Pipa ]