Should I add both JAVA_HOME and JRE_HOME in environmental variable, PATH?

后端 未结 4 1740
北恋
北恋 2020-12-06 03:21

I ran into this error while setting up my Tomcat and Java environmental path:

Neither the JAVA_HOME nor the JRE_HOME environmental variables is defi

4条回答
  •  半阙折子戏
    2020-12-06 04:01

    Try this...

    For Java,

    In the User variables, add PATH value is C:\Program Files\Java\jdk1.8.0_25\bin;

    For Tomcat

    In the System variables, add JAVA_HOME value is C:\Program Files\Java\jdk1.8.0_25

    Now classpath has been set to your machine. You can access java from anywhere in your machine.

    After Done this, Go to Command Prompt and go to ApacheTomcat*x.x and move to bin folder,,

    Start the Server

    startup.bat
    

    For check Tomcat running status, Go to your browser, and Paste the URL,

    http://localhost:8080/

    Stop the Server

    shutdown.bat
    

提交回复
热议问题