Home  >  Q&A  >  body text

How to change the JDK version of jspStudy?

We know that jspStudy comes with jdk, version 1.7. My project needs to use 1.8, so it needs to be replaced. However, when I tried to replace it with the downloaded file in the jdk/jre folder, I found that Tomcat could not start!

How to solve?

王维王维2605 days ago2084

reply all(3)I'll reply

  • 王维

    王维2019-03-13 23:52:26

    I hope the official will come forward to solve it, or if it can't be solved, please explain it!

    reply
    0
  • 王维

    王维2019-03-13 23:51:03

    More than a year later, it still remains unresolved. . .

    reply
    0
  • PHP中文网

    PHP中文网2017-09-01 09:21:54

    Install JDK. Select the installation directory. Installation prompts will appear twice during the installation process. The first time is to install jdk, and the second time is to install jre. It is recommended to install both in different folders within the same java folder. (They cannot both be installed in the root directory of the java folder. An error will occur if jdk and jre are installed in the same folder)

    JDK installation and environment variable configuration

    1: Install jdk and choose the directory at will. Just modify the directory before the default installation directory java

    2: Install jre → change → java. The previous directory is the same as the directory where jdk is installed

    Note: If there is no installation directory requirement, all default settings can be used. There is no need to make any modifications, just click Next twice.
    JDK installation and environment variable configuration
    JDK installation and environment variable configuration

    After installing JDK, configure environment variables Computer→Properties→Advanced System Settings→Advanced→Environment Variables
    JDK installation and environment variable configuration

    System Variables→New JAVA_HOME variable.

    Fill in the jdk installation directory with variable value (I am E:Javajdk1.7.0)

    System variables → Find Path variable → Edit

    Enter %JAVA_HOME%bin;%JAVA_HOME%jrebin;
    at the end of the variable value
    (Pay attention to whether there is a ; sign at the end of the original Path variable value. If not, enter the ; sign first and then enter the above code)
    JDK installation and environment variable configuration

    System variables→Create new CLASSPATH variable

    Fill in the variable value .;%JAVA_HOME%lib;%JAVA_HOME%libtools.jar (note the dot at the front)

    System variables are configured
    JDK installation and environment variable configuration
    7

    Check whether the configuration is successful. Run cmd and enter java -version (there is a space between java and -version)

    If the version information is displayed as shown in the figure, the installation and configuration are successful.

    reply
    0
  • 王维

    There seems to be no specific answer. Note that I want to replace the JDK of jspStudy. PS. My jspStudy installation path is D:jspStudy. After installation, it comes with JDK, the path is: D:jspStudyJDK. There is only one folder jre under it, and there are only two folders bin and lib in jre. The JDK I need to replace is this JDK.

    王维 · 2017-09-01 10:57:19
  • Cancelreply