tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mann, Ivan H" <>
Subject CLASSPATH, .jar files, packages, and so forth
Date Wed, 31 Oct 2007 20:25:35 GMT

> I have an application  that consists of >150 classes, organized in
> several different packages.
> In the past I have installed the application in
> .../webapps/<appl>/<directories> where the directory tree corresponds
> to the package layout, and this has worked fine.
> I am trying to change this to using .jar files for a couple of
> reasons.  I took one package and created a jar file like this:
> cd webapps/<appl>/
> jar cvf schedule.jar applet/schedule/*.class
> mv schedule.jar WEB-INF/lib
> rm applet/schedule/*.class
> I modified to read WEB-INF/lib and add all .jar
> files to the CLASSPATH before starting tomcat.  Now when I try to
> access one of the classes that I put into schedule.jar it throws a
> NoClassDefFoundError.
> If I run a test program with CLASSPATH pointing to the webapps/<appl>
> directory and WEB-INF/lib/schedule.jar it works fine.  In tomcat it
> doesn't find the class.  I would suspect that there an issue with the
> way I build the jar file, but I can't figure out why it works outside
> of tomcat but not inside.  
> What I would really like is a cookbook document telling me how to
> distribute an application in jar files to the web.  I have Googled
> many combinations of words and can't find one.  If anybody has one of
> those I would really appreciate it.  I thing I am missing a step here,
> possibly making the manifest, but I just don't know what that missing
> step is.
> Thanks for the help.
> Ivan Mann

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message