Server is not connected when trying to deploy with intellij

前端 未结 5 458
不知归路
不知归路 2020-12-15 05:24

I am trying to build, deploy and debug my webapp inside intellij.

I have setup my tomcat using this answer and I was able to get the server running. The issue is th

5条回答
  •  旧时难觅i
    2020-12-15 05:47

    In my case, this problem was due to a JAVA_OPTS variable defined in catalina.bat (or catalina.sh).

    I only commented the first line of catalina.bat and everything started working. Here is the line :

    set "JAVA_OPTS=-Xmx1024M -XX:MaxPermSize=512m -Djava.util.logging.config.file=logging.properties -Djava.net.preferIPv4Stack=true"
    

    To comment, put rem in front of it. rem is the way to comment a line in windows .bat files.

    I suppose that this line conflicts with IntelliJ JAVA_OPTS settings. In fact, IntelliJ tries to set a port on tomcat to use as a debugger, but the catalina.bat JAVA_OPTS variable deleted this setting.

提交回复
热议问题