• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

shoot me, but answer this

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • 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??
 
Brian Pipa
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • 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
 
Steve Lovelace
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • 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
  • 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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic