How to use Payara Eclipse IDE plugin

Photo of Gaurav Gupta by Gaurav Gupta

Are you looking for a smooth and efficient way to develop and deploy Jakarta EE applications using Payara Server within the Eclipse IDE? Look no further! The Payara Eclipse Plugin is a powerful tool that streamlines the development process and facilitates seamless integration between your application and the Payara Server. In this blog, we will walk you through the step-by-step process of installing, configuring, and utilizing the Payara Eclipse Plugin to enhance your Jakarta EE development experience.

Prerequisites

  1. OpenEclipse IDE and navigate to Help > Eclipse Marketplace.
  2. In the search bar, type "Payara" and press Enter.
  3. Look for the "Payara Tools" plugin and click "Install".
  4. Follow the on-screen instructions to complete the installation.
  5. Restart Eclipse IDE to activate the plugin.

Configure the Payara Server Runtime

  1. In Eclipse IDE, open the Servers view by going to “Window → Show Views → Servers”.
  2. Now that you have the Servers view, click the link to create a new server.
  3. Select “Payara” as the server type in the New Server window.
    4. Now, specify a descriptive name for the Payara runtime, browse to the directory where you installed Payara Server, and select the appropriate Java Runtime Environment (JRE). The server name is simply an identifier you can use to differentiate between servers. Choose a meaningful name that helps you easily identify this specific Payara runtime.

5. Finally, specify the host name (localhost is typically used for development purposes) and provide any necessary domain details relevant to your Payara Server setup. If you have not made any custom changes to your Payara Server configuration yet, the default values will be sufficient. Click "Finish" to complete the process and add the Payara runtime to your Eclipse IDE.

Create a Web Project

  1. To create a new project, click File → New → Project.
  2. Select "Web" from the list and choose "Dynamic Web Project".
  3. Enter a project name and select the Payara runtime you configured earlier as the Target Runtime and click "Finish".

Associate Existing Projects with the Payara Server

  1. Right-click on the existing project, then select "Properties".
  2. In the Properties window, go to the "Targeted Runtimes" section.
  3. Choose the Payara Server from the list of available runtimes.
  4. Click "Apply and Close" to associate the selected Payara Server with your existing project.

This will associate the selected Payara Server with your existing project, enabling you to run and debug the application using the Payara Server within the Eclipse IDE.

Deploy Your Application to Payara Server

  1. Right-click on the project and select "Run As → Run on Server".

2. Choose your Payara Server runtime and click "Finish".
3. Eclipse IDE will deploy your application to the Payara Server, and you should see the server logs in the Console window.

Debug Your Application 

  1. To debug your application, set breakpoints in your code.
  2. Right-click on your Payara Server in the Servers view and choose "Debug".
  3. Eclipse will connect to the server in debug mode, allowing you to step through your code and inspect variables.

Conclusion 

Congratulations! You have successfully installed, configured, and utilized the Payara Server tools feature of the Payara Eclipse Plugin to enhance your Jakarta EE development workflow. With this powerful tool at your disposal, you can seamlessly develop and deploy applications to Payara Server right from within the Eclipse IDE. This integration saves time and improves overall productivity, allowing you to focus on building robust and feature-rich Jakarta EE applications without leaving the IDE. It's time to write some code! For inspiration, check out thePayara Examples repository on GitHub for some sample applications.

Additionally, it's worth noting that the Payara Eclipse tools also provide support for Payara Micro, a topic that will be covered in our upcoming blog post. Stay tuned for more insights into utilizing Payara Micro within your development workflow.
 
Using another IDE?
Interested in fully managed cloud native Jakarta EE? Try our new product Payara Cloud. Unlike building an application server deployment on a Cloud Infrastructure as a Service or on raw Kubernetes, Payara Cloud takes care of provisioning infrastructure, installation, configuration, deployment and scaling of your application.
Find out more:
Payara Cloud 

Comments