java 需要jdk和jre进行编译,我们可以通过这三处文件多jdk和jre进行动态配置;
1处文件是配置jdk和jre的(要配置在文件头部,相当于定义全局变量)
rem ---------------------------------------------------------------------------
rem Set JAVA_HOME or JRE_HOME if not already set, ensure any provided settings
rem are valid and consistent with the selected start-up options and set up the
rem endorsed directory.
rem ---------------------------------------------------------------------------
set JAVA_HOME = C:\Program Files\Java\jdk1.8.0_181
set JRE_HOME = C:\Program Files\Java\jre1.8.0_181
rem Make sure prerequisite environment variables are set
rem In debug mode we need a real JDK (JAVA_HOME)
if ""%1"" == ""debug"" goto needJavaHome
有事路径混乱,需要重新定义安装路径(配置2和3的文件)
2
set JAVA_HOME = C:\Program Files\Java\jdk1.8.0_181
set TOMCAT_HOME = C:\xampp\tomcat
@echo off
rem Licensed to the Apache Software Foundation (ASF) under one or more
rem contributor license agreements. See the NOTICE file distributed with
rem this work for additional information regarding copyright ownership.
rem The ASF licenses this file to You under the Apache License, Version 2.0
rem (the "License"); you may not use this file except in compliance with
rem the License. You may obtain a copy of the License at
3
set JAVA_HOME = C:\Program Files\Java\jdk1.8.0_181
set TOMCAT_HOME = C:\xampp\tomcat
@echo off
rem Licensed to the Apache Software Foundation (ASF) under one or more
rem contributor license agreements. See the NOTICE file distributed with