This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Tomcat has two different distributions. One is a service installer, and another is a zip file. If you download and install the service installer, it runs as a windows service. But you probably downloaded the second one and this one does not have a setup file. So, what you need to is simply unzip the file. Once unzipped if you explore the folder, you will get a file called startup.bat under bin directory. You need to execute this file to start tomcat, of course after setting the environment variables like java_home,catalina_home etc.
Have you set the java_home env variable? What look to me is you are setting it in command prompt, right? Problem with this approach is every time you re open a new command prompt the value is lost. Better if you set it from MyComputer->Properties.
That's how I did it. I'm using the command prompt to check that it's done.
STEP 2: Create an Environment Variable JAVA_HOME
You need to create an environment variable called "JAVA_HOME" and set it to your JDK installed directory.
1.First, take note of your JDK installed directory (the default is "c:\program files\java\jdk1.7.0" or "c:\program files\java\jdk1.6.0_xx").
2.Start a CMD shell, and issue the command "SET JAVA_HOME" to check if variable JAVA_HOME is set:
prompt> set JAVA_HOME
Environment variable JAVA_HOME not definedIf JAVA_HOME is set (by other applications), check if it is set to your JDK installed directory.
3.To set/change an environment variable in Windows 2000/XP/Vista/7: Click "Start" button ⇒ "Control Panel" ⇒ "System" ⇒ (Vista/7) "Advanced system settings" ⇒ Switch to "Advanced" tab ⇒ "Environment Variables" ⇒ "System Variables" (or "User Variables" for the current user only) ⇒ "New" (or "Edit" for modification) ⇒ In "Variable Name" field, enter "JAVA_HOME" ⇒ In "Variable Value" field, enter your JDK installed directory (e.g., "c:\program file\java\jdk1.7.0") - I suggest that you copy and paste the directory name to avoid typo error!
4.To verify, RE-START a CMD shell and issue:
prompt> set JAVA_HOME
JAVA_HOME=c:\program file\java\jdk1.7.0 <== CHECK! YOUR JDK installed directory
Do I need to do this? To make permanent changes, store the above command in ".bash_profile" in your home directory (denoted as '~'), and run "source $HOME/.bash_profile" to refresh.
Is it referring to C:\Program Files\Java\jdk1.7.0_03