2

I deleted few Tomcat installations from the Linux server (CentOS). There after i installed Tomcat 8. Now when i try to start Tomcat 8 (./startup.sh) it gives the following error:

Cannot find /opt/apache-tomcat-7.0.56/bin/setclasspath.sh
This file is needed to run this program

Seems like i have not removed the previous installation of tomcat properly. How can i get this to work. Help.

Update

[root@localhost bin]# ./startup.sh 
Using CATALINA_BASE:   /usr/local/tomcat7
Using CATALINA_HOME:   /usr/local/tomcat7
Using CATALINA_TMPDIR: /usr/local/tomcat7/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /usr/local/tomcat7/bin/bootstrap.jar:/usr/local/tomcat7/bin/tomcat-juli.jar
Tomcat started.
Illep
  • 15,441
  • 42
  • 155
  • 275
  • I think the launcher you using `./startup.sh` is of Tomcat 7 and new launcher should be there. – Skynet Nov 12 '14 at 05:02
  • No i deleted all that was there in that folder ? Do you think that it has to be something with setting paths ? – Illep Nov 12 '14 at 05:06
  • Yes it could be problem with JRE settings – Skynet Nov 12 '14 at 05:10
  • How can i remove it. Every time i type a command related to tomcat it gives me the above error. Even `./version`. – Illep Nov 12 '14 at 05:12
  • yeah until the path is configured the system will not able to recognized the utility or command you asking for. – Skynet Nov 12 '14 at 05:14
  • 1
    I typed `unset CATALINA_HOME` and then started the script and then it works. Can you check my updated Post. – Illep Nov 12 '14 at 05:15

1 Answers1

4

Try to run this command

unset CATALINA_HOME

This command will unset the environmental variable CATALINA_HOME.

There is two ways to add this command to start up linux command as follows

First method

Second method

Now you will not have to run this command again and again on booting.

Community
  • 1
  • 1
Skynet
  • 6,048
  • 5
  • 44
  • 49
  • Yes. i tried that. then it worked. However, every time i restart the server i have to type the above code. Is there a permanent solution for this ? – Illep Nov 12 '14 at 05:16
  • I have pasted the output i got. Is there any problem with the JRE – Illep Nov 12 '14 at 05:20
  • no as I said it may be have problems but as of I seen the output I don't think there is any problem with JRE. – Skynet Nov 12 '14 at 05:21
  • I have added two methods to run the command in start up use any one of them I hope that will be fine to run automatically on boot – Skynet Nov 12 '14 at 05:26
  • @Emdadul it's a pleasure to help you – Skynet Sep 13 '17 at 11:22