aspose file tools*
The moose likes JBoss/WildFly and the fly likes Include folder to classpath in JBOSS7 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Include folder to classpath in JBOSS7" Watch "Include folder to classpath in JBOSS7" New topic
Author

Include folder to classpath in JBOSS7

Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 587
    
    3

Hi,
Currently, we are using JBOSS 5.1.0, in our application. Now, we have decided to migrate it to JBOSS7. The problem is as below.
We have a config folder in where we have around 7-8 properties file, which are referred by our application. In JBOSS 5, we pasted this config file inside JBOSS_HOME and edited the run.bat/run.sh file, to include this folder in JBOSS classpath and in Java file, we used to access it.

Now, in JBOSS7, we are not able to do this. Can anyone help me in achieving the same. Do we need to do some configuration in stanalone.xml/domain.xml? Please help on the same.

P:S: we are using jboss-as-7.1.1.Final
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

In earlier versions of JBoss AS, such as 5.1, the server/xxx/conf directory was always in the classpath, so placing a properties file in there enabled you to do a getResource lookup. I haven't tried this yet, bu in 7.1, try placing the properties file in standalone/configuration.


JBoss In Action
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 587
    
    3

Thanks Peter for the reply, but, putting properties file into standalone/configurations didn't work, however, I found an solution by loading the properties file as modules.
Paco Perez
Greenhorn

Joined: Jun 05, 2012
Posts: 1
Hi. I'm new to jBoss 7.1.1 and i'm very interested in doing what you have managed loading properties files as modules, because i've the same problem.

I come from jBoss 4.2.2 world and i used to load properties and resources using the classpath but i don't know how to change it in this jBoss version. is it possible? If not, i would like to load my properties files as modules.

Could you explain in a few lines the method?

Thank you very much.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Include folder to classpath in JBOSS7