views:

273

answers:

1

Looks like Jetty team wanted to do some spring cleaning between versions 6 and 7, and it looks as if one useful system property, "jetty.lib" either does not exist, does not work, or just has changed in an unspecified way so as to make my jetty 6 set up work easily with Jetty 7.

I tried searching through Jetty 7 docs, but about the only reference I saw was that "some commonly used properties (such as "jetty.home") still work as they used to".

So, what am I missing? I really would want to avoid messing with things within Jetty distribution dirs (otherwise I could -- and maybe I have to? -- just use JETTY_BASE/lib/ext), and that's what "jetty.lib" was useful for.

+1  A: 

Ok looks like answer was hidden within "start.config" (bundled in start.jar), which defines fundamental path settings. Specifically, among first lines, we have:


# add a property defined classpath

${path}.path property path

# add a property defined library directory

${lib}/** exists ${lib}


so one might think property to use would be:

java -jar start.jar -Dlib=mydir/lib

but this is not the case: trick being that here curlies mean that it has to be a "property" (not "property or system property"). And hence what is really needed is:

java -jar start.jar lib=mydir/lib

or at least that seems to work.

As an added bonus, it looks you could also override "start.config" to use by doing

java -jar start.jar -DSTART=my-start.config ...

which would give full power of redefining method used for setting paths altogether.

I hope others find this useful.

UPDATE: This Jetty doc explains most of above even better...

StaxMan