Classpath for WAR

I have a java application that I run from the command line. I need to access classes in a war file. It works fine in production because my web app is not in a war file.I tried adding the war file and WEB-INF to my classpath with no luck
[243 byte] By [jrcamirea] at [2007-11-26 16:33:38]
# 1

> I have a java application that I run from the command

> line. I need to access classes in a war file. It

> works fine in production because my web app is not in

> a war file.I tried adding the war file and

> WEB-INF to my classpath with no luck

You can use them by adding the WAR to the classpath. If the WAR is in an extracted form, you could add the WEB-INF/classes directory to the classpath but not within the archive.

You might be able to do this by something similar to a JAR classloader; the way a web container does it.

http://java.sun.com/docs/books/tutorial/deployment/jar/jarclassloader.html

annie79a at 2007-7-8 22:58:22 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...