• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

shoot me, but answer this

 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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??
 
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"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?
 
Brian Pipa
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


"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 ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic