• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Tomcat

 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone!

I'm trying to install Tomcat manually. I've done the following to try to set the environment variables but still getting a message that they are not set.

cd c:\
PATH="C:\Program Files\Java\jdk1.6.0_10\bin";%PATH%
set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_10
set CLASSPATH=.;C:\apache-tomcat-6.0.16\lib\servlet-api.jar;C:\apache-tomcat-6.0.16\lib\jsp-api.jar;C:\apache-tomcat-6.0.16\lib\el-api.jar;C:\Servlets+JSP;..;..\..
pause

I appreciate it
 
Master Rancher
Posts: 4465
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You probably want to have them set permanently vs doing it manually every time. What OS do you have?
On XP go to Settings|Control Panel|System|Advance|Environment Variables and enter a CLASSPATH, etc entry or add to the existing one.
[ July 03, 2008: Message edited by: Norm Radder ]
 
Claude Cundiff
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Vista.

But shouldn't it work regardless?
 
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It should work if you are starting tomcat from the same command prompt (or script) where you have those set commands you listed. If is done in some other command prompt or through double clicking the icon for example then you might run into problems.
 
Claude Cundiff
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a .bat file with the following:

cd c:\
PATH="C:\Program Files\Java\jdk1.6.0_10\bin";%PATH%
set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_10
set CLASSPATH=.;C:\apache-tomcat-6.0.16\lib\servlet-api.jar;C:\apache-tomcat-6.0.16\lib\jsp-api.jar;C:\apache-tomcat-6.0.16\lib\el-api.jar;C:\Servlets+JSP;..;..\..
cd apache-tomcat-6.0.16/bin
startup.bat
pause

It doesn't work. It doesn't pause either.
 
Ilari Moilanen
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the error message you receive?
And it does not pause because the startup.bat probably calls exit or the like in the end and so the pause command is never reached.
 
Claude Cundiff
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I went into the "setclasspath.bat" file and put in the location of the jdk.
However, when i try to start Tomcat, I get "Neither the JAVA_HOME..." (see below: this is a snippet of setclasspath.bat)

rem Make sure prerequisite environment variables are set
if not "%JAVA_HOME%" == "C:\Program Files\Java\jdk1.6.0_05" goto gotJdkHome
if not "%JRE_HOME%" == "" goto gotJreHome
echo Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
echo At least one of these environment variable is needed to run this program
goto exit
 
Ilari Moilanen
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm confused. This line

if not "%JAVA_HOME%" == "C:\Program Files\Java\jdk1.6.0_05" goto gotJdkHome


checks that JAVA_HOME is "C:\Program Files\Java\jdk1.6.0_05" and if it is returns false. Why is that? The original file (the unchanged one) looks like this
rem Make sure prerequisite environment variables are set
if not "%JAVA_HOME%" == "" goto gotJdkHome
if not "%JRE_HOME%" == "" goto gotJreHome
echo Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
echo At least one of these environment variable is needed to run this program
goto exit

and it works fine on my computer... Just tested.
 
Claude Cundiff
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
got it! Thanks for helping me work through this! This site Rocks!!!
 
reply
    Bookmark Topic Watch Topic
  • New Topic