As a java developer using eclipse, every time, when we made the change on the
class, annotation or the xml files, eclipse will pop up a message let us decide
‘continue, restart tomcat and more’. I am kind of appreciate its kindness. However, most of the time, I
have to select ‘restart’. So, I just wish eclipse or tomcat can help to
reload class files and don’t bother me that option.
Before, I found jRebel which is perfect for my wishing. It
is just hard to push management team pay for that $365 per license
annually.
So, I need to cater myself and the one I can afford which is
$0 a year, and it’s using Apache License.
How to config?
#1 download jar from https://github.com/spring-projects/spring-loaded
#2 in your eclipse, adding below arguments in the VM
arguments. You need to amend the path to the jar file in your machine.
-Djavaagent:C:/Dev/lib/springloaded-1.1.2.20130430.jar
–noverify
#3 Ready to go
in my case it worked as:
ReplyDelete-javaagent:/path_to_jar/springloaded.jar -noverify
Thanks. Yours are more generic :)
ReplyDeleteOn a Windows Service tomcat installation I found that I had to use
ReplyDelete-Xverify:none
-javaagent:"C:\path_to_jar\springloaded-1.2.1.RELEASE.jar"
notice I used -Xverify:none instead of -noverify, otherwise it woudn't recognize the command, spent hours troubleshooting because of that little detail.
I find that it works great for changing method bodies or constructors, but it doesn't actually let me add new methods or fields, they don't get recognized until I restart the app, which is a bummer, and it's strange because their documentation says otherwise.
Does anybody have the same problem? JVM has java 7 but the project's source level is set to java 6
is it work on tomcat jee
ReplyDeleteThe hephen before noverify is not formatted properly for copying and pasting over but it works after I replaced it (with correct mapping of course).
ReplyDelete