Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Classpath length when deploying to Windows

Reply
Thread Tools

Classpath length when deploying to Windows

 
 
Andy Dingley
Guest
Posts: n/a
 
      10-08-2009
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!
 
Reply With Quote
 
 
 
 
Dagon
Guest
Posts: n/a
 
      10-08-2009
Andy Dingley <> wrote:
>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.
--
Mark Rafn <http://www.dagon.net/>
 
Reply With Quote
 
 
 
 
Lew
Guest
Posts: n/a
 
      10-08-2009
Andy Dingley *<ding...@codesmiths.com> wrote:
>> 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.

>


Dagon wrote:
> 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/*

--
Lew
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      10-08-2009
On Thu, 8 Oct 2009 03:46:41 -0700 (PDT), Andy Dingley
<> wrote, quoted or indirectly quoted someone
who said :

>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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
.classpath file instead of the CLASSPATH Environment variable. dontspammenow@yahoo.com Java 2 03-02-2008 08:19 AM
problem compiling project, classpath in xml ".classpath" "<classpathentry...>" jameshanley39@yahoo.co.uk Java 2 03-02-2007 12:37 PM
while using javac -classpath some.jar some.java (Where does classpath get stored?) Gabe Java 3 08-27-2004 07:02 PM
CLASSPATH, -cp and -classpath misunderstanding? Flip Java 3 02-09-2004 10:09 PM
deploying and re-deploying ASP.Net applications =?Utf-8?B?VG9tIE4=?= ASP .Net 2 02-04-2004 09:31 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57