Typically, the Java file is modified and eclipse needs to be restarted. But MyEclipse can use it.
In fact, the immediate compilation has long ago, by simply configuring the Javarebel configuration, you can modify the Java file without restarting Eclipse.
Note: I use the Tomcat run project, so I introduce the configuration of Tomcat in eclipse
1), download the Javarebel jar package
Official website: http://www.zeroturnaround.com/javarebel/download/(need to register account, seemingly license only 15 days)
360 Cloud Disk: Https://yunpan.cn/cSVxxJIVGvDim access password 68de
2), go to the Run Configuration/debug Configuration page and add the rebel boot configuration. Note You need to select the corresponding Tomcat.
Click the down arrow in the diagram.
The contents are as follows:
-noverify-javaagent:f:\javarebel\javarebel.jar
-drebel.spring_plugin=true
-drebel.struts2-plugin=true
Parameter explanation: Reference: http://avery-leo.iteye.com/blog/757677
3), the Tomcat auto reload disabled off. Double-click Tomcat on the Server page.
Results:
Javarebel:directory ' E:\study\java\eclipseWorkspace\6_5\test\WebRoot\WEB-INF\classes ' would be monitored for class Changes.
If the above prompts indicate that the Javarebel has been configured successfully.
Next, you can modify the code in eclipse to compile and test.
If eclipse prompts you, simply shut it down and you find that your modified class file has been loaded by the JVM.
The simplest rough way, in fact, or directly output a statement, this is the kingly .... (did not appear,, hehe,,,)
Eclipse Java Class modified instant compilation