I am using JBoss as my app server. My application using almost 100 jars (libraraies).So How can I specify class path for all the libraries jar's because its not possible to define individually in JBoss_CLASSPATH .Can I define xml for the classpath but I don't know how JBoss detect or read the code of that xml file.
Anybody have little idea..pleas HELP

Package your enterprise application as an ear file, with the jars in the required directory structure, and it's all taken care of.

Do NOT put everything in the app server's lib directory.

Hey..I got your point. But I don't want to deploy my (libraries) jars with my ear.
I just want to use classess from the jars.

Anyways thanks for your reply.

How are you going to use those classes if you don't have them?
And to have them they have to be in the ear.

How are you going to use those classes if you don't have them?
And to have them they have to be in the ear.

I can specify classpath for all the jars in run.bat. So it is not necessary to be a part of ear..

I feared as much. That is NOT the way to go about it.
NEVER do that, classes specified there are ONLY for use by JBoss itself, NOT intended for use by applications running inside JBoss.
Those should have their own jars inside their ear files.

How can I modify the classpath for an individual application? There are reasons for not including all files in the EAR file itself, so how can it be done?

How can I modify the classpath for an individual application? There are reasons for not including all files in the EAR file itself, so how can it be done?

being rational minded enough to create a new thread with your question instead of re-opening one that hasn't been open in over a year would be a nice start.

Thanks for the warm welcome!
Above thread covers my issue perfectly, so why should I open a new thread?

Thanks for the warm welcome!
Above thread covers my issue perfectly, so why should I open a new thread?

if it covers your issue perfectly, there's no need to reopen it, since either the answer is in there, or either no-one answered (maybe for a reason)

if it does not cover your issue perfectly, it's always better to start a new thread.

so, my advice, if it covers it perfectly, read the answers already given.

It is unanswered as there is no solution posted for how to set a classpath for an application.

I feared as much. That is NOT the way to go about it.
NEVER do that, classes specified there are ONLY for use by JBoss itself, NOT intended for use by applications running inside JBoss.
Those should have their own jars inside their ear files.

kind of is answered

It is not.
I want *my* application to read some files from the classpath which are, for a reason, NOT in the EAR file.
That's why I don't want to access the JBOSS classpath but have a new entry in my applications classpath.

It is not.
I want *my* application to read some files from the classpath which are, for a reason, NOT in the EAR file.
That's why I don't want to access the JBOSS classpath but have a new entry in my applications classpath.

*sigh*
YOUR question may not have been answered, the original one was. looks like it didn't perfectly covered what you wanted huh?

*sigh*
YOUR question may not have been answered, the original one was. looks like it didn't perfectly covered what you wanted huh?

No comment.

my answers for this would be:

- define your own classloader within your application to load classes that resist outside your running application

- google "adaptiveclassloader"

- jee-compliant servers dont want you to put your libraries outside of a WAR or EAR in the first place. If we dont want to be boxed in, maybe we should try to avoid using JEE appservers

your answer for this would be:
about three years over due.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.