Question

I am working on a Spring webapp which I run locally through Tomcat 7. I am working on my project using Eclipse and I use JRebel to apply any changes I make in real time. When I start Tomcat, I get a prompt asking me if I would like to launch the application with a JRebel agent, at which point I say yes and Tomcat launches successfully with JRebel monitoring my changes.

There is also the option to not be asked again in this prompt, and (I may be wrong in assuming this) I thought it would remember my choice to launch with the agent. It doesn't however and proceeds to start without JRebel starting up next time I launch tomcat, if I have checked that option.

My question is is there any way to automatically launch the agent when Tomcat starts (if any of the projects have a JRebel nature of course)?

I am using JRebel 5.3.1.

Was it helpful?

Solution

Managed to solve this issue, thank you for the suggestions.

As Anton Arhipov suggested I looked in the config center to see if the server I was deploying to was there, but it was not for some reason. I am not sure how Tomcat is configured on my machine but I think it has something to do with that.

I managed to get it to launch by adding the JRebel jar as a JVM parameter in my Tomcat settings similar to what Darius suggested. I did this by going to Window -> Preferences -> Tomcat -> JVM Settings and adding the parameter -javaagent:[Path to your jar]/jrebel.jar to the "Append JVM Parameters" box. Now it successfully launches whenever I start Tomcat.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top