I am not able to start my tomcat.
It is giving the below gien error:
The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE
I have done th following settings in the user variables:
Are those actually user environment variables? Because unless Tomcat runs under your user account it doesn't see those. Change the JAVA_HOME variable into a system variable. You can also drop the other two as far as Tomcat is concerned, it doesn't need those. Especially the PATH variable is dangerous, as it removes all other PATH entries.
The same values are there in the system variables as well. Tried deleting the PATH as well.
No progress. Same result.
John Jai
Rancher
Joined: May 31, 2011
Posts: 1372
posted
0
Any particular reason you have the \lib under path? Keep only the System variables and try removing the \lib from the Path variable. Let this be @ first path - C:\Program Files\Java\jdk1.6.0_24\bin. Try java -version in the cmd prompt and confirm if your path is right. Open a new cmd prompt after altering these values.
nattynids Gupta
Greenhorn
Joined: Jan 23, 2012
Posts: 6
posted
0
Hi John,
No particular reason why lib was there.
I modified the PATH to C:\Program Files\Java\jdk1.6.0_24\bin
Still the same error.
Do i need to restart the sytem after these changes?
What i did was i modified the PATH & restarted the Tomcat.
John Jai
Rancher
Joined: May 31, 2011
Posts: 1372
posted
0
I have seen this error recently and resolved by configuring JAVA_HOME as a System Variable. Just after configuring and starting Tomcat again it worked well.
John Jai
Rancher
Joined: May 31, 2011
Posts: 1372
posted
0
Try below commands and check if you are getting desired results -
Yikes - So the JAVA_HOME is pointed to a JDK but still you get the error like JAVA_HOME should point to a JDK and not a JRE?
Is the error still occurring while starting Tomcat?
nattynids Gupta
Greenhorn
Joined: Jan 23, 2012
Posts: 6
posted
0
yes ji...
Tel me do we need to map from java build path in eclipse?
Akhilesh Trivedi
Ranch Hand
Joined: Jun 22, 2005
Posts: 1351
posted
0
nattynids Gupta wrote:yes ji...
Tel me do we need to map from java build path in eclipse?
Are you starting Tomcat from within Eclipse? Try restarting eclipse.