小弟初学java,之前用eclipse就出现tomcat无法启动,但没有报错信息,只显示启动失败,查了一天也没找到原因
所以换了IDEA想看看这边报错不,部署好tomcat启动之后,output里面显示
D:\apache-tomcat-9.0.0.M26\bin\catalina.bat run
[2017-08-18 12:19:13,329] Artifact IDEA:war exploded: Waiting for server connection to start artifact deployment...
'#' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
Using CATALINA_BASE:   "C:\Users\Administrator\.IntelliJIdea2017.2\system\tomcat\Unnamed_Test_2"
Using CATALINA_HOME:   "D:\apache-tomcat-9.0.0.M26"
Using CATALINA_TMPDIR: "D:\apache-tomcat-9.0.0.M26\temp"
Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_144"
Using CLASSPATH:       "D:\apache-tomcat-9.0.0.M26\bin\bootstrap.jar;D:\apache-tomcat-9.0.0.M26\bin\tomcat-juli.jar"
Disconnected from server
请问一下这是什么原因导致的tomcat启动失败?万分感谢!

解决方案 »

  1.   

    直接启动tomcat  bin/startup.bat 看一下
      

  2.   


    直接启动的话闪一下就没有了,在cmd里面tomcat bin目录下启动的话也是输出上面一样的内容
      

  3.   

    初学的话,不建议安太高的版本,因为如果有问题,网上可查的信息比较少,7,8用的多些吧JDK配置好了没?感觉像是JDK的问题。
      

  4.   


    JDK是1.8的,变量配置肯定没问题
    那我去换个1.7的JDK再试试看
      

  5.   

    jdk jre问题编辑bin/setclasspath.bat,添加红字,自己路径
    @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
    rem
    rem     http://www.apache.org/licenses/LICENSE-2.0
    rem
    rem Unless required by applicable law or agreed to in writing, software
    rem distributed under the License is distributed on an "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 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_92
    set JRE_HOME=C:\Program Files\Java\jre1.8.0_92
      

  6.   

    我也昨晚刚弄好我的tomcat ,估计是环境产量的问题,你设置一下,还有就是tomcat 的安装位置,放到eclipse 的工作空间文件夹里试试