1

Here are the steps I took to create and deploy my project. Tell me where it is getting wrong. I am newbie in jrebel. Please help me out.

1) I made a project in my eclipse workspace

C:\Users\we\hibernate\mavenspring2

2) I downloaded the jrebel trial plugin and made the settings for the project as shown by their youtube video.

enter image description here

It generated a rebel.xml in my src/main/resources/ folder.

enter image description here

3)

Then I made the war of the project using Maven. It created the war in my target folder

C:\Users\we\hibernate\mavenspring2\target\mavenspring2.war

Then I copied the war file to my tomcat webapp directory.

I ran the tomcat by startup.bat ( I dont want to run the server by eclipse).

enter image description here

I typed localhost:8181/mavenspring2/ The application is running correctly

But where can I change the java files to reflect it to the deployed application directly without server restart?? I am making the changes in my workspace folder, but nothing is getting changed in the running web application.

Help me out.

Arnab Dhar
  • 239
  • 2
  • 15

1 Answers1

2

If you started Tomcat from startup.bat, it means that Tomcat started without JRebel, unless you've manually added the -javaagent VM argument pointing to jrebel.jar. Please refer to the manual to bootstrap JRebel accordingly.

Or, you can start Tomcat from Eclipse and make sure that JRebel is enabled for that Tomcat instance. Then, during the startup you will see JRebel banner which will be the indication that JRebel has started successfully. After that, you will also see messages that JRebel is monitoring the folders that are configured in the generated rebel.xml file.

After this you will be able change the code in the workspace and see the changes without restarts.

Anton Arhipov
  • 6,479
  • 1
  • 35
  • 43
  • I got it. I need to set the jrebel.jar path as a script in my catalina file of tomcat. Can I paste following code anywhere in the catalinta.bat file?? set JAVA_OPTS=-javaagent:/path/to/jrebel.jar – Arnab Dhar Aug 05 '15 at 13:18
  • Better create a dedicated script as suggested in a manual. The script would setup the VM argument and invoke the original script. This way you would preserve the original script unmodified. See here: http://manuals.zeroturnaround.com/jrebel/standalone/launch-from-command-line.html#tomcat-4-x-5-x-6-x-7-x-and-8-x – Anton Arhipov Aug 05 '15 at 19:24