In today's video, I'm going to show you how to configure JRebel with your WebLogic server. In the first part, I will cover how to set up your project with JRebel, and in the second part, I will cover how to set up JRebel on your WebLogic server.

Step 0: Download JRebel Plugin

Before you start with the configuration, please make sure that you have downloaded our JRebel plug-in for your IDE. The plug-in is available for all major IDEs. In case you are using IntelliJ, just open the "Preference" window here, then go to the plug-in section and search for "JRebel." Once shown, just hit the "Install" button, and that's it.

Step 1: Configuring JRebel for WebLogic

Let's now start with the first step in this project configuration. JRebel needs to know where are your sources, and it uses a configuration file called Rebel for this. The file can be easily generated by the IDE plug-in. In your project explorer, just right-click your project, then go to the JRebel and select "Enable JRebel."

As you can see, the configuration file is generated. This file needs to be in your artifact file, so make sure to rebuild and redeploy the application now.

Step 2: Start Weblogic With JRebel Agent

The second step is to start WebLogic with the JRebel Agent attached. If you added the WebLogic server to your IDE and starting application within IDE, as well. Just simply use one of the two new buttons to start WebLogic with JRebel in normal mode or in debug mode. This will attach the agent automatically. As you can see, this is the default configuration in my WebLogic server, starting within the IDE. 

If I now want to start WebLogic with the JRebel enabled, I just need to use one of these two new buttons here. With the first button, you will start your server in normal mode, and with the second button, you will start your application in debug mode.

You can check that the JRebel agent was attached by checking the very beginning of the server output. If JRebel is enabled, you should be able to see the JRebel banner here, with the version and other information printed out.

Step 2A: Modify the Startup Script

In case the WebLogic server is running outside the IDE, you need to modify the start-up script. Open up the JRebel configuration window in IDE by clicking on "Help", then "JRebel configuration," and here, under "JRebel," select the JRebel start-up. On this page, select the "Run locally from and select your target environment. In this case, we're going to select the WebLogic, and we are going to follow the instructions.

The instructions are following: In the server folder, you need to create a start-up file with JRebel configuration, and then start a server with this newly created file. So I will go pick the content here, and then switch to my terminal window, and as you can see, right now I'm in the server configuration folder. Here, I will create a new file, "WebLogic Jrebel.SH", and I will open the file.

In this newly created file, I will put my clipboard content and save the file. Now, if you are running on the system, you need to do one more step, and that is to allow it to execute this file using the command here. Once done, you can start a server using the newly created script like this. You can see that the JRebel agent is attached, because the JRebel banner is printed out. In the JRebel banner, you can see the version and other information. So that is how you set up JRebel with your WebLogic server. Thank you for watching.

Additional Resources

Looking for additional reading on WebLogic? Be sure to visit our WebLogic documentation.

Learn more in our blog >>  What Is WebLogic?

Want to try JRebel on your project? Click the button below for access to a free, 10-day JRebel trial.

Try JRebel Free