Using JRebel with Bukkit

Discussion in 'Resources' started by tips48, Aug 27, 2013.


Will you use JRebel?

  1. Yes, It looks useful!

  2. No, To hard to setup!

  3. No, I'm lazy!

    0 vote(s)
  4. No, I have no use for it!

    0 vote(s)
  5. Maybe, I'm not sure!

Thread Status:
Not open for further replies.
  1. Hey guys!

    Today, I'm going to teach you how to save Bukkits of time with JRebel, Eclipse, and Bukkit. You can use other IDEs, but since I use Eclipse this tutorial will use Eclipse. I would recommend reading this if you've never seen it, it's helpful. Lets get started!
    The only requirement is that you use Maven. If you're not using it, I think it's possible, but I'm not quite sure how. Experimentation! ;)

    First off, create an account here. Assuming you don't have a paid version, you can get the free version, JRebel Social, by hooking up your twitter/facebook (I used a twitter I have for dev purposes). It's well worth it!

    Next, Install the JRebel Eclipse plugin. Simply go to Help -> Eclipse Marketplace. It was the second choice for me because it's featured, but if you can't find it search for 'JRebel'. Copy the key that you received when you signed up for JRebel Social, and in Eclipse go to Help -> JRebel Config Center -> Activate/Update license.

    Alright, were doing good! Next up were going to create a debug configuration for your plugin. Goto Project Name -> Debug As -> Debug Configurations or Debug -> Debug Configurations. Create a new configuration under Remote Configurations. Change the host to your host (Probably localhost) and the port to 25565 (Unless you use something different, obviously). Lastly, navigate to Source and click Add -> Java Project -> Your Project.



    Next, add these arguments to your start.bat:
    -javaagent:jrebel.jar -Drebel.remoting_plugin=true -Xdebug -Xrunjdwp:transport=dt_socket,address=25565,server=y,suspend=n
    And place jrebel.jar in your server directory. You can download it on the JRebel website

    Make sure you change 25565 to the port your using if you use something different.


    Lastly, setup JRebel in eclipse by adding:
    to your pom.xml. You also need to navigate to Project Name -> JRebel -> Enable Nature.

    That's it! You're all ready. To begin, build your plugin with maven and place it in the plugins folder of your server. Start your server with the modified start.bat that was shown above. Next, and this is important because you will not be able to connect until you've done it, go to Eclipse and choose Project Name -> Debug As -> Debug Configurations -> Debug. Lastly, start your Minecraft client and connect to the server. To test, I used a plugin with a BlockBreakListener and modified it so it cancelled the event and told the player something.

    If you need help, post below. I can't guarantee that I can fix it, but I'll try.

    ENJOY! This saved me tons of time, so I spent some of it creating this tutorial. Let me know if you have any complaints/comments/if this helped.

    Hellsing, NoChance20 and Minecrell like this.
  2. Offline


    tips48 Nice :) But maybe you should have posted it in the Resources Section :) But this is very helpfull :) Thanks
  3. Yeah, I reported it to get moved. I thought I was in resources
  4. Offline


    I don't really get it: What's the improvement from debugging by Remote Java Applications like in this thread you mentioned to debugging by JRebel?
  5. Try adding a method to your code. Eclipse will give you a nasty error about how that can't be hot-swapped in. JRebel fixes this.
  6. Offline


    Thank you, now I got it. :D BTW: Really useful resource! :D
    etaxi341 and tips48 like this.
  7. Offline


    Moved to correct section.
  8. Thanks!
  9. Offline


    Where's the start.bat supposed to be?
  10. Your server dir
  11. Offline


    Thank you, worked perfectly but i think you forgot to say that we have to place jrebel.jar in our server folder.
  12. whoops, thanks
  13. Offline


  14. Offline


    i have set everything up correctly but jrebel still cant hot swap new methods and such, there is under Jrebel a setting called "enable remoting" which i assume will make things work but i require a deployment url
    do you know anything about this? what version of jrebel are you running?
Thread Status:
Not open for further replies.

Share This Page