I'm currently running Solr out of a Jetty container that it ships with. It runs correctly when run from the command line via:
java -jar start.jar
when I'm in the same directory as start.jar. Unfortunately I need to be able to launch jetty from any directory, not just the one that contains start.jar. I've tried many options, such as:
java -Dsolr.solr.home=~/solr/ -Djetty.home=~/solr/ -Djetty.logs=~/solr/logs/ -cp ~/solr/start.jar:~/solr/lib/jetty-util-6.1.26-patched-JETTY-1340.jar:~/solr/lib/jetty-6.1.26-patched-JETTY-1340.jar:~/solr/lib/servlet-api-2.5-20081211.jar -jar ~/solr/start.jar ~/solr/etc/jetty.xml
Every time I get this backtrace:
java.lang.ClassNotFoundException: org.mortbay.xml.XmlConfiguration
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.mortbay.start.Main.invokeMain(Main.java:179)
at org.mortbay.start.Main.start(Main.java:534)
at org.mortbay.start.Main.start(Main.java:441)
at org.mortbay.start.Main.main(Main.java:119)