add -home <directory> as an argument to jsvc. if you type /bin/jsvc --help at a command line there are a bunch of other parameters you may find helpful.
also if you look in /jsvc-src/native there are a couple of Tomcat?.sh files (pretty old but you will get the idea) that you can modify to start and stop tomcat via jsvc. mas On 03/24/2011 01:43 PM, Kevin wrote: > Hi, I'm pulling my hair trying to install Tomcat 7.0.11 on my machine. > > > > Here's my info at a glance: > > > > OS: Ubuntu 10.10 > > Tomcat version: 7.0.11 > > Tomcat main folder path: /usr/local/apache-tomcat-7.0.11/ > > JDK version (via the java -version command) : 1.6.0.24 > > JDK location: /usr/lib/jvm/java-6-sun > > > > I'm running in to a problem trying to run Tomcat as a daemon via jsvc. > Before I installed Tomcat I set $JAVA_HOME in: > > > > /etc/environment > > > > to: > > > > /usr/lib/jvm/java-6-sun (logged out then back in, then used $echo > $JAVA_HOME to verify it was set) > > > > Then I installed Tomcat, un-tar'd the commons-daemon-native.tar.gz, and > "./configure" 'd it. It complained about JAVA_HOME not being set, so I had > to "./configure" it again with: > > > > --with-java=/usr/lib/jvm/java-6-sun > > > > Then used "make". Copied it to: > > > > usr/local/apache-tomcat-7.0.11/bin > > > > .and try to execute: > > > > /bin/jsvc -cp ./bin/bootstrap.jar:./bin/tomcat-juli.jar \ > > -outfile ./logs/catalina.out -errfile ./logs/catalina.err \ > > org.apache.catalina.startup.Bootstrap > > > > which gives me the dreaded "Cannot locate Java Home" error. It tried > setting it in ~/.bashrc with the line: > > > > export JAVA_HOME=/usr/lib/jvm/java-6-sun > > > > and logged out and back in. Still to no dice. > > > > I honestly don't know what to do and am at a loss right now. I think it > might have to do with the jdk, but I installed it straight from the package > manager. > > I'm pretty sure only the JDK comes with javac, and using javac -version > produces 1.6.0_24. So. I'm pretty sure I have both the JRE and JDK > > > > Can someone, anyone, try to help me? I honestly don't know what to do > anymore. > > -- Mark Shifman MD. Ph.D. Yale Center for Medical Informatics Phone (203)737-5219 [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
