0

Play recompiles files for you automatically after changes have been made and the browser refreshed. This makes Jrebel unnecessary for Play.

Our flagship product JRebel lets you change your application code and just hit refresh in your browser and you’ll see the changes instantly. Play! framework offers something similar. I have not read enough source code but it seems that with custom extra metadata (see your app’s tmp/bytecode/DEV), a stateless model and the custom runner (play run) they will give you the power of changing code on the fly. If they don’t support the change they will restart your app automatically for you.

http://zeroturnaround.com/rebellabs/my-top-5-play-framework-features/

However, if you include a library in the Play project that you are making chages to then Jrebel can come in handy so those changes are auto-compiled.

Should Jrebel be included in the Play project or in the library? What would be the simplest workflow?

BAR
  • 15,909
  • 27
  • 97
  • 185
  • Basically... Play utilizes the `sbt`'s `watch` function to watch files for changes and it compiles and refreshed the run with changes. But, it happens only on play development server ( `run` ) and play production server ( `start` ) does not do this. – sarveshseri Feb 27 '15 at 19:17
  • That makes sense, production should not need to watch for changes. But the question is about development and external libraries needing reloading. Play (sbt) does not watch for library changes. – BAR Feb 27 '15 at 19:29
  • The recent `sbt` has a new feature called `sbt server`, so you can actually achieve that very easily by having another daemon watching for file changes ( or whatever else you want... may be for every tweet about Scala ) and notifying `sbt` server to perform desired action... without stopping the running process. – sarveshseri Feb 27 '15 at 19:46
  • Note that the article at ZT's website was written for Play! Framework version 1.x, not Play 2.0. – Anton Arhipov Feb 28 '15 at 22:11

1 Answers1

0

Easiest way to include JRebel in any project is to follow quickstart guide http://zeroturnaround.com/software/jrebel/quickstart/eclipse/

Most importantly there are 3 parts.

  1. Download JRebel and activate license
  2. Generate rebel.xml config file into library .jar files
  3. Run the play process with jrebel.jar javaagent

After that JRebel will monitor changes in folders defined in rebel.xml and it will reload changes to the .jar library that you are developing.

Margus Pala
  • 8,433
  • 8
  • 42
  • 52