mardi 17 février 2015

instalation tomcat : JAVA_HOME should point to a JDK not a JRE

Hello Every one, In day to day alignment some time we get some common errors and generally we spend a lot of time upon them. Recently i got an error , while doing setup of tomcat to run my flash+facebook application. To test my facebook application i was needed a web server that needs to be configure first . I used Tomcat 6.0. To make tomcat run applications smoothly we need to setup java_home or jre_home variables. Tomcat requires java to be install on your machine. as documented i put PATH and CLASSPATH variables according to the documentation like ….
variable: CLASSPATH
value : c:\Program Files\Java\jdk1.6.0\jre\lib;

variable: JAVA_HOME
value : C:\Program Files\Java\jdk1.6.0;
variable: PATH
value : C:\Program Files\Java\jre1.6.0;C:\Program Files\Java\jdk1.6.0\bin;C:\Program Files\Java\jre1.6.0\bin;C:\apache-tomcat-6.0.14\bin;
variable: JRE_HOME
value : C:\Program Files\Java\jre1.6.0;
but when i was running tomcat , the result was like this..
  • C:\apache-tomcat-6.0.14\bin>startup.bat   
  • 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   
  • C:\apache-tomcat-6.0.14\bin>  
  • Solution : After search on google i found a solution, and the solution was to remove semi-colon from the end of JRE_HOME / JAVA_HOME variables. there should not be semi-colon…
    variable: JAVA_HOME
    value : C:\Program Files\Java\jdk1.6.0  (note : no semicolon at the end)

    variable: JRE_HOME
    value : C:\Program Files\Java\jre1.6.0  (note : no semicolon at the end)

    Apply above changes and run your tomcat successfully.
    Thanks.

    Aucun commentaire:

    Enregistrer un commentaire