I have a maven built project built into a jar file. It is a standalone java application.
Now I tried to run this project using:
java -cp SpringMavenProject-1.0.jar;<maven repo path>\spring\2.5.5\spring-2.5.5.jar;
<maven repo path>\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar
com.vaannila.HelloWorldApp
However, it cannot find the the Spring XML config file.
I can see the config file is in the jar file created by maven.
How can I specify the path of the Spring XML file?
Thanks
I’ll assume that you have the Spring context XML in a directory that’s in the CLASSPATH and your app is accessing it using the
ClasspathXmlApplicationContext(not certain of the exact class name).If the directory that your context XML resides is not in your -cp list, I’d suggest that you add it and see if that works better for you.