users@glassfish.java.net

Re: multiple jars and classpaths

From: <glassfish_at_javadesktop.org>
Date: Thu, 23 Aug 2007 13:01:09 PDT

>> Is there no way to set a lib path from the admin console?
During deployment, there is a text box for you to list out the extra jar paths, which is equalivant to --libraries option in asadmin deploy command.
However, this is only available during deployment, if you want to change this, you need to undeploy and then deploy the app again, specifying the new value.

I believe your intension is to NOT have to list out each individual jar files, but just specify the directory where these jars can be found. AFAIK, using this --libraries attribute, you still need to list out the jars one by one, as a classpath, you cannot just specify the directory.

If you don't mind that this libraries be shared by other applications, you can make use of the common class loader. Just copy the JAR files into the <domain-dir>/lib directory and then restart the server, then you don't even need to list these jars for the web app at all.
There is a faq blog http://blogs.sun.com/sivakumart/entry/classloaders_in_glassfish_an_attempt
that may be useful.
[Message sent by forum member 'anilam' (anilam)]

http://forums.java.net/jive/thread.jspa?messageID=232387