« Apologies to Darren Hobbs | Main | New release of Trang »

java -cp classpath.xml ...

We're deploying a messaging app onto GNU/Linux at the moment. We had some problems, as you do, with declaring the classpath. So we were thinking: it would be just grand if you could declare the classpath passed to JDK tools in an XML config file. You could point the JDK tools to the file instead of this constant messing about with delimited path lists in batch files. Things might even become manageable.

java -cp /usr/java/myapp/classpath.xml ...


January 15, 2003 04:40 PM

Comments

Danny Ayers
(January 15, 2003 05:19 PM #)

This would be very handy, classpath is such a persistent pain. Perhaps a job for the LazyWeb?

Danny Ayers
(January 15, 2003 05:20 PM #)

let me try that link again :
http://www.lazyweb.org/

James Strachan
(January 15, 2003 06:37 PM #)

Try classworlds.

There's a Maven plugin, so you can create a single uber-jar containing all the jars you need, with a textual config file describing the jars you need and the hierarchy of classloaders.

Or just use it by itself.

Note it doesn't use XML as thats one of the most common causes of classpath woes (JAXP, Xerces, JDK1.4 etc) :-)

James Strachan
(January 15, 2003 06:38 PM #)

Danny Ayers
(January 16, 2003 10:19 AM #)

Thanks James - another Bob McWhirter gem I see.

Danny Ayers
(January 16, 2003 10:23 AM #)

PS. Bill - the link to Uche's site goes elsewhere

Aslak Hellesy
(January 18, 2003 05:16 PM #)

How about using Class-Path in MANIFEST.MF?

Danny
(April 15, 2003 08:41 PM #)

for future reference : a command-line cp tool : JWhich

http://www.javaworld.com/javatips/jw-javatip105_p.html

Trackback Pings

TrackBack URL for this entry:
http://www.dehora.net/mt/mt-tb.cgi/889