I have a folder in my C: drive as C:\app_config\java_app
This folder contains some locale specific property files.
I have a java class (PrjPropertilesLocator
) that loads the property files based on default locale on the startup of the web App.My web application is running inside tomcat. The problem is how should i set this directory C:\app_config\java_app
in the tomcat classpath so that this becomes available to the ResourceBundle inside the PrjPropertilesLocator
class. Is there a way i can set this folder specifically for a Single web app that needs it.I do not want to put the property files inside WEB-INF/classes
folder.
On weblogic this runs fine.I set the directory inside the weblogic classpath in one of its startup scripts and it works fine. But on Tomcat i tried putting it in startup.bat
also in setclasspath.bat
, but was not able to do so successfully.
A classpath is an argument that tells the JVM where to find the classes and packages necessary to run a program. The classpath is always set from a source outside the program itself.
This can also be set in the Eclipse GUI by right-clicking on the project, selecting Properties->Java Build Path. Then select Add External Class Folder and enter the directory where you want to store your classes.
Just specify it in shared.loader
or common.loader
property of /conf/catalina.properties
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With