Idea 热部署出现1099端口被占用的提醒

Idea编译器热部署时报错 1099 端口占用(Application Server was not connected before run configuration stop, reason:)


idea的热部署功能基于插件 JRebel,具体可以看    这里   


首先,检查端口是否被占用

   不用什么CMD之类的,过于繁琐,直接更改Idea 的tomcat启动端口,随便更改两三次,大于1000即可,(大部分端口都未使用);可以就OK,不行就接着看。

  当然更鼓励使用命令行检查(学习新东西肯定至少不是太坏的事情)。

检查JRE

  如果没有JRE,或者没有配置JAVA环境的,建议先去找一个JAVA入门视频和书籍。

  有JRE并且环境正确,请将这里的 默认 或 1.x  更改为jre配置环境的路径


如果还是不行,引用这篇博客的观点:点击打开链接

3.如果还没有解决,我建议你看一下tomcat的bin目录下的setclasspath.bat文件,看一下下面加粗的两行是不是还是不对,如果不对的话,改一下,就可以运行了

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_121
set JRE_HOME=C:\Program Files\Java\jdk1.8.0_121\jre

rem Make sure prerequisite environment variables are set

rem In debug mode we need a real JDK (JAVA_HOME)
if “”%1”” == “”debug”” goto needJavaHome

rem Otherwise either JRE or JDK are 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 is needed to run this program
goto exit

:needJavaHome
rem Check if we have a usable JDK
if “%JAVA_HOME%” == “” goto noJavaHome
if not exist “%JAVA_HOME%\bin\java.exe” goto noJavaHome
if not exist “%JAVA_HOME%\bin\javaw.exe” goto noJavaHome
if not exist “%JAVA_HOME%\bin\jdb.exe” goto noJavaHome
if not exist “%JAVA_HOME%\bin\javac.exe” goto noJavaHome
set “JRE_HOME=%JAVA_HOME%”


猜你喜欢

转载自blog.csdn.net/m0_37961948/article/details/78949586