最近开始使用JReble插件,安装成功并且配置成功。本来兴高采烈准备使用了,然而一运行,发现出错了。
IDEA 2019.2 + Tomca 8.5 + JDk 9 + Spring MVC 4.0 +JRebel 2018.1
"D:\Program Files (x86)\apache-tomcat-8.5.12\bin\catalina.bat" run
[2019-08-28 01:33:57,757] Artifact signup:war exploded: Server is not connected. Deploy is not available.
Using CATALINA_BASE: "C:\Users\Carroll\.IntelliJIdea2019.2\system\tomcat\Tomcat_8_5_12_JSP"
Using CATALINA_HOME: "D:\Program Files (x86)\apache-tomcat-8.5.12"
Using CATALINA_TMPDIR: "D:\Program Files (x86)\apache-tomcat-8.5.12\temp"
Using JRE_HOME: "C:\Program Files\Java\jdk1.8.0_91\jre"
Using CLASSPATH: "D:\Program Files (x86)\apache-tomcat-8.5.12\bin\bootstrap.jar;D:\Program Files (x86)\apache-tomcat-8.5.12\bin\tomcat-juli.jar"
JRebel-JVMTI [FATAL] Couldn't write to C:\Users\cdsy\.jrebel\bootcache. Please make sure that this location exists and is writable, or specify another location by changing the 'rebel.base' system property.
Disconnected from server
出现这个问题的原因是因为C盘 路径里有中文名字,也就是Windows 的用户名是中文,我更改了用户名,发现还没有解决。
最后在Tomcat里修改编码,如图所示,成功解决了
修改编码:
“java_opts” value=“-Dfile.encoding=UTF-8 -Djava.awt.headless=true -Xms2048m -Xmx2048m”
最后,成功启动JReble,实现热部署,如下图: