File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Tomcat6 on Ubuntu Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat6 on Ubuntu" Watch "Tomcat6 on Ubuntu" New topic

Tomcat6 on Ubuntu

Pavan bhagavatula

Joined: Oct 22, 2011
Posts: 3
Need help from Tomcat and Ubuntu user group..

I have the following script to start / stop / restart my tomcat server on ubuntu OS. Start is working fine but when i try to stop i am getting syntax syntax error below..

export JAVA_HOME=/usr/lib/jvm/jdk1.7.0

case $1 in
sh /usr/local/tomcat/bin/
sh /usr/local/tomcat/bin/
sh /usr/local/tomcat/bin/
sh /usr/local/tomcat/bin/
exit 0

Here is the error..
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/lib/jvm/jdk1.7.0
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar
/usr/lib/jvm/jdk1.7.0/bin/java: 1: Syntax error: "(" unexpected
pavan@pavan-Vostro-220-Series:/etc/init.d$ ^C

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

Best I can figure out is that maybe your script has been damaged.

Try this shutdown command instead and see what happens:

sh /usr/local/tomcat/bin/ stop

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Tomcat6 on Ubuntu
It's not a secret anymore!