954,510 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

specify libraries class path in JBoss

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

ronpar123
Newbie Poster
10 posts since Feb 2007
Reputation Points: 10
Solved Threads: 0
 

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.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

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.

ronpar123
Newbie Poster
10 posts since Feb 2007
Reputation Points: 10
Solved Threads: 0
 

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.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 
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..

ronpar123
Newbie Poster
10 posts since Feb 2007
Reputation Points: 10
Solved Threads: 0
 

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.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

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?

mbaierl
Newbie Poster
7 posts since Nov 2008
Reputation Points: 10
Solved Threads: 0
 
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.

stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433
 

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

mbaierl
Newbie Poster
7 posts since Nov 2008
Reputation Points: 10
Solved Threads: 0
 
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.

stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433
 

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

mbaierl
Newbie Poster
7 posts since Nov 2008
Reputation Points: 10
Solved Threads: 0
 
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

stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433
 

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.

mbaierl
Newbie Poster
7 posts since Nov 2008
Reputation Points: 10
Solved Threads: 0
 
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?

stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433
 
*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.

mbaierl
Newbie Poster
7 posts since Nov 2008
Reputation Points: 10
Solved Threads: 0
 

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

oneansweruser
Newbie Poster
1 post since Jul 2011
Reputation Points: 10
Solved Threads: 0
 

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

stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You