Classpath length when deploying to Windows

A

Andy Dingley

We have a big beast of a web app, with a large set of library jars.
Deploys fine onto Unix, but under Windows we're running into problems
with the length of the classpath blowing Windows' limits.

What are people's favoured ways to address this?

We're using Ant & Ivy to build it, Hudson for CI. There are maybe 200
jars total, including those just used during the continuous
integration testing.

Thanks for any suggestions!
 
D

Dagon

Andy Dingley said:
We have a big beast of a web app, with a large set of library jars.
Deploys fine onto Unix, but under Windows we're running into problems
with the length of the classpath blowing Windows' limits.

What limits, specifically?
What are people's favoured ways to address this?

If it's just a commandline length or environment variable length issue, the
common way to address it is to not use those. Use Manifest entries in your
main application jar, or build a classloader whose path you specify as part of
your app (in a properties file or some such).

Many apps also consolidate a lot of their jars into one, but you'd want more
specific reasons before you go down that route, as it makes dependency
management a serious PITA.
 
L

Lew

What limits, specifically?
...
If it's just a commandline length or environment variable length issue, the
common way to address it is to not use those.  Use Manifest entries in your
main application jar, or build a classloader whose path you specify as part of
your app (in a properties file or some such).

+1

Many apps also consolidate a lot of their jars into one, but you'd want more
specific reasons before you go down that route, as it makes dependency
management a serious PITA.

With the current version of Java you can specify a wildcard, which has
the effect of including every JAR in a given directory in the class
path:

META-INF/MANIFEST.MF:
...
Class-Path: lib/*
 
R

Roedy Green

What are people's favoured ways to address this?

1. use a jar. It can have an internal classpath if necessary.

2. put the classpath on the command line.

3. use ANT

4. use Java Web Start.

5. put jars in the ext directory.

6. use mechanisms provided by your Servlet womb.


I consider the global classpath an anachronism.

--
Roedy Green Canadian Mind Products
http://mindprod.com

I advocate that super programmers who can juggle vastly more complex balls than average guys can, should be banned, by management, from dragging the average crowd into system complexity zones where the whole team will start to drown.
~ Jan V.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top