Redeploy alternatives to JRebel [closed]
Asked Answered
P

8

196

JRebel allows for newly compiled code to be redeployed without restarting the application. I am wondering if there are any alternative (free?). The FAQ page answers this question, but I am sure it's biased towards JRebel. This question was asked a year ago on this site, but I am bringing it back up to see if anyone has any new information.

On a side note, I really like JRebel, but if there is a free alternative, I am willing to try it.

One additional note, I am working on an open source project, and they offer free one year licenses to people who can prove they are on an open source project. Which works great for me (www.kuali.org), but I won't be on that project forever.

Polish answered 3/11, 2011 at 16:46 Comment(5)
Good question. We've been looking for an alternative to JRebel as well, since their sales department is extremely invasive. We have no problems paying for a product like JRebel, but not when they are pestering our developers and IT department 24/7.Railhead
There is an alternative to jRebel by the own ZeroTurnAround: the free version of Jrebel to opensource projects and study case... my.jrebel.comChromogenic
I know it's late reply, you can take a look at Spring Loaded - , which is a JVM agent for reloading class file changes whilst a JVM is running. It transforms classes at loadtime to make them amenable to later reloading. Unlike 'hot code replace' which only allows simple changes once a JVM is running (e.g. changes to method bodies), Spring Loaded allows you to add/modify/delete methods/fields/constructors and more...Genisia
Eclipse debugger - replaces your live code instantly.Unreal
Try posting this on the sister site, Software Recommendations Stack Exchange.Impertinent
H
102

Take a look at DCEVM, it's a modification of the HotSpot VM that allows unlimited class redefinitions at runtime. You can add/remove fields and methods and change the super types of a class at runtime.

The binaries available on the original site are limited to Java 6u25 and to early versions of Java 7. The project has been forked on Github and supports recent versions of Java 7 and 8. The maintainer provides binaries for 32/64 bits VMs on Windows/Linux. Starting with Java 11 the project moved to a new GitHub repository and now also provides binaries for OS X.

DCEVM is packaged for Debian and Ubuntu, it's conveniently integrated with OpenJDK and can be invoked with java -dcevm. The name of the package depends on the version of the default JDK:

Haugh answered 3/11, 2011 at 18:21 Comment(12)
anyone else tried that? is it worth a try - since it is a reasearch project?Fictitious
It works fine, I found it faster and less memory consuming than JRebel. The only restriction is to stick to Java 6u25.Haugh
Thank you very much. I've ruined the whole day trying to get jRebel to work as desired. DCEVM came to rescue.Hummingbird
As per this comment, devblog.guidewire.com/2011/05/06/the-dynamic-code-evolution-vm/… , the author of DCEVM and his colleagues are now work for Oracle and highly likely it will be available in Java 8.Elbowroom
Yes, he is the author of JEP 159.Haugh
Here are full build & install instructions for DCEVM on JDK 7u45 and MacOSX: neu242.livejournal.com/52962.htmlRailhead
JEP 159 is not part of JDK 8. It may have postponed to JDK 9 but no confirmation yet.Adorn
Found some full JVM 1.7 binaries here: dcevm.nentjes.com so no need to patch your JVM. I tried the win64 one and it worked great for me. I also blogged about it here if you need more details: javainformed.blogspot.com/2014/01/jrebel-free-alternative.htmlCholecystitis
This is the nicest thing I have heard in 2014. No configurations, just 30 seconds of a work. Great project and most likely be a part of Java 8 :)Upandcoming
Up-to-date fork available @ dcevm.github.ioSinusoid
And now directly in Debian: packages.qa.debian.org/o/openjdk-7-jre-dcevm.htmlHaugh
The fine print is that you are forced into using the serial GC, which is the slowest GC that the JVM offers.Susurrus
W
42

Hotswap Agent is an extension to DCEVM which supports many Java frameworks (reload Spring bean definition, Hibernate entity mapping, logger level setup, ...).

There is also lot of documentation how to setup DCEVM and compiled binaries for Java 1.7.

Wivinah answered 24/2, 2014 at 21:12 Comment(5)
They now have a dedicated web site: hotswapagent.org. The project is quite new but it appears to work quite well.Aila
I followed this tutorial to integrate it in eclipse after isntalling it : tirthalpatel.blogspot.fr/2014/06/… it works like a charmCorazoncorban
@Wivinah After installing 'Hotswap agent', do we need to install DCEVM? Because I have installed DCEVM using "sudo apt install openjdk-11-jre-dcevm" in Ubuntu 19.04 and also the plugin in IntelliJ Ultimate 2019.1.3. If installing 'Hotswap agent' let alone do the job of JRebel, what's the use of DCEVM!?Girlfriend
DCEVM can do hotswap out-of-the-box now, no need to install Hotswap Agent.Komsa
Warning, hotswapagent itself, do not enhance class relaoding. in jvm. It jsut wathces classapth, and if you modify ithere, it reloads. But is obeys limitations of given JDKCasework
B
21

DCEVM supports enhanced class redefinitions and is available for current JDK7 and JDK8.

https://github.com/dcevm/dcevm/releases

HotswapAgent is an free JRebel alternative and supports DCEVM in various Frameworks.

http://hotswapagent.org/

Bellbird answered 1/5, 2014 at 13:13 Comment(0)
T
20

By the Spring guys, used for Grails reloading but works with Java too:

https://github.com/SpringSource/spring-loaded

Turbulence answered 30/1, 2013 at 7:18 Comment(4)
I don't want to grumble but spring-loaded does not support dependency reloading.Diazole
As I recall, there are system properties you can set to tell it what packages to make reloadable. It has other limitations and I would probably rather go with DCEVM in any event.Turbulence
"what packages to make reloadable" - correct. The problem as pointed out by @Diazole is that it won't reload the dependent JARs. That's essential for Maven multi-module projects.Winwaloe
This project is in the attic for now !Bertrambertrand
H
12

I have written an article about DCEVM: Spring-mvc + Velocity + DCEVM

I think it's worth it, since my environment is running without any problems.

Humblebee answered 4/2, 2012 at 1:46 Comment(0)
C
9

I have been working on an open source project that allows you to hot replace classes over and above what hot swap allows: https://github.com/fakereplace/fakereplace

It may or may not work for you, but any feedback is appreciated

Cinch answered 13/5, 2012 at 0:58 Comment(0)
B
4

You might want to take a look this:

HotSwap support: the object-oriented architecture of the Java HotSpot VM enables advanced features such as on-the-fly class redefinition, or "HotSwap". This feature provides the ability to substitute modified code in a running application through the debugger APIs. HotSwap adds functionality to the Java Platform Debugger Architecture, enabling a class to be updated during execution while under the control of a debugger. It also allows profiling operations to be performed by hotswapping in versions of methods in which profiling code has been inserted.

For the moment, this only allows for newly compiled method body to be redeployed without restarting the application. All you have to do is to run it with a debugger. I tried it in Eclipse and it works splendidly.

Also, as Emmanuel Bourg mentioned in his answer (JEP 159), there is hope to have support for the addition of supertypes and the addition and removal of methods and fields.

Reference: Java Whitepaper 135217: Reliability, Availability and Serviceability

Bairam answered 28/4, 2014 at 12:36 Comment(0)
G
-4

JRebel is free. Don't buy it. Select the "free" option (radio button) on the "buy" page. Then select "Social". After you sign up, you will get a fully functional JRebel license key. You can then download JRebel or use the key in your IDEs embedded version. The catch, (yes, there is a catch), you have to allow them to post on your behalf (advertise) once a month on your FB timeline or Twitter account. I gave them my twitter account, no biggie, I never use it and no one I know really uses it. So save $260.

Gregorygregrory answered 8/11, 2013 at 17:25 Comment(7)
There's one more catch. It JRebel Social is free only for non-commercial use. Yes, sure, we won't check if you're actually using it for your personal project or at work, but the auditors might not like it if they see you misusing the software.Stitch
I would never suggest otherwise. In fact - the only reason I bring this up is because there is no "individual" license anymore. I was able to get my company to pay for my work license. I then also paid for a personal license, for my personal use, for over 3 years. But when the price when north of $260 a year, that became impractical. This is the best solution for me (and others), but I would have also kept paying for it if the price was reasonable.Gregorygregrory
Also, the fact that every year I need to repurchase software I already bought is frustrating. No other company does this. Usually you buy software once. If you opt in to upgrade - then you buy it again for full price (or maybe an upgrade price, depending on the company). But what you're paying for then are NEW features - not the same features you already paid for. It would be like Apple or Microsoft disabling your computer each year until you paid for the OS again. Food for thought.Gregorygregrory
150$/y for personal - no problem i would pay forever, 350/y nah i also switched to free trial, its not so hard to create another email every 3 months, f.e. hmamail 30 secs.Tobacconist
JRebel Social has been replaced with myJRebel. Its free for non commercial use, you just need to allow the sharing of stats: my.jrebel.comAnemophilous
All in all, JRebel is relatively cheap for a developer software license.Parenteau
As of July 5 2018, myJRebel is no longer available. Right now it is $550/year for a single developer license.Sarmentose

© 2022 - 2024 — McMap. All rights reserved.