开发者

Jetty 6 to Jetty 7 upgrade: what happened to system property "jetty.lib"? (-Djetty.lib=my/lib/dir)

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.


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...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜