-
1. Re: Application's CLASSPATH
codetwister Aug 17, 2006 2:12 PM (in response to codetwister)One more thing.
I also know I could package that jar, funnyUtility.jar, with myApp.ear. Is that righ thing to do or there is some other way?
Let's say I do that, do I still have to set the CLASSPATH and if yes how should I set the CLASSPATH that is application's specific and not server wide? What's the best place to store application's-external jars?
Thanks. -
2. Re: Application's CLASSPATH
jaikiran Aug 18, 2006 9:01 AM (in response to codetwister)You can place the funnyUtility.jar inside your myApp.ear. After placing it in the .ear file, to make it available in the classpath, you will have to add an entry in the application.xml file present in your myApp.ear/META-INF directory. The entry will be as follows:
<module> <java>funnyUtility.jar</java> </module>
-
3. Re: Application's CLASSPATH
codetwister Aug 18, 2006 3:23 PM (in response to codetwister)Thanks.
But I would like not to place funnyUtility.jar inside myApp.ear because one day those jars could be required by onother application. Could I just have some directory on the server where I would store applicatiopn's specific jars and then to set the CLASSPATH, that is application's specific CLASSPATH not server wide, to it? -
4. Re: Application's CLASSPATH
technobrat Aug 21, 2006 2:47 PM (in response to codetwister)Looks like you want to have your cake and eat it too.
Luckily, I think you can. Take a look at http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossClassLoadingUseCases
You could try by creating a classloading scope for your myApp.ear (which contains funnyUtility.jar) and then simply reuse that classloading scope for other ears which need access to funnyUtility.jar.