This was the wrong time when you started Tomcat with idea: Application Server is not connected before run configuration stop, reason:unable to ping serv ER at localhost:1099 on the Internet to check, found that we have given so many solutions 1. Port Change Some people say that the port is occupied, a change can be, but I tried it myself, seemingly useless 2.JVM of memory is not enough I don't feel that way, and it turns out that at least I'm not that wrong. Here's the real reason why I'm having a problem this time: 3.java Environment Not configured Tomcat needs the JRE, and if your java_home is not configured, it's definitely not going to get up. But my Java environment is configured, but this idea is very strange, not only to Java_home, but also to a jre_home, you need to put your jre_home in the environment variables are also configured If this is done, the problem is still unresolved, there are several possible 1. You have multiple JRE in your computer, you must select the one that you configured the environment variable for when you chose the JRE for Tomcat in idea.
2. This is also my case, when choosing the JRE or when configuring Jre_home, you have to choose the JRE under the JDK directory, which means you have to choose C:\Program Files\java\jdk1.8.0_121\jre and not C:\Program files\java\jre1.8.0_131 3. If not, I suggest you look at the Setclasspath.bat file in the Tomcat bin directory, and see if the two lines below are still not correct, and if not, change it to run
REM the License. Obtain a copy of the License at
Rem
REM http://www.apache.org/licenses/LICENSE-2.0
Rem
REM unless required by applicable law or agreed to writing, software
REM distributed under the License is distributed on a "as is" BASIS,
REM without warranties or CONDITIONS of any KIND, either express or implied.
REM See the License for the specific language governing permissions and
REM limitations under the License.
REM —————————————————————————
REM Set Java_home or Jre_home if not already set, ensure any provided settings
REM is 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_121
Set Jre_home=c:\program files\java\jdk1.8.0_121\jre
REM Make sure prerequisite environment variables is set
REM in debug mode We need a real JDK (java_home)
If ""%1 "" = = "" Debug "" Goto Needjavahome
REM Otherwise either JRE or JDK is fine
If not "%jre_home%" = = "goto gotjrehome
If not "%java_home%" = = "goto gotjavahome
Echo neither the Java_home nor the JRE_HOME environment variable is defined
Echo at least one of these environment variable are needed to run this program
Goto exit
: Needjavahome
Rem Check If we have a usable JDK
if "%java_home%" = = "goto Nojavahome
If not exist"%ja Va_home%\bin\java.exe "goto Nojavahome
If not exist"%java_home%\bin\javaw.exe "goto nojavahome
If not exist"%J Ava_home%\bin\jdb.exe "goto Nojavahome
If not exist"%java_home%\bin\javac.exe "goto nojavahome
Set" Jre_home=%j Ava_home% "