Payara Micro VSCode Tooling

Payara

 

In this tutorial, I will explain how to create, run and debug a Payara Micro application in Visual Studio Code. (If you’re interested in learning more about using Payara Server in VSCode, please checkout ourprevious blogs.)

Prerequisite VSCode Extensions

Before going through this tutorial, you must install the following extensions from the Visual Studio Code marketplace:

You can install extensions from Extensions view (Ctrl + Shift + X) in the activity bar of VS Code:payara tools

Creating a Payara Micro Application

Maven is the most widely used project build and dependency management tool in the Java ecosystem. So in this tutorial we will generate a Payara Micro Maven Web Application through the Payara Micro Maven archetype.

Let’s start:

  • Open the command pallet using Ctrl + Shift + P, type Payara Micro and select the Generate a Payara Micro Project option:
payara micro maven web application
  • Answer the prompts (groupId, artifactId, etc) to set up the project:
set up the project in maven
  • Enter the context path of application:
Enter the context path of application:
  • Select the Payara Micro version:
Select the Payara Micro version:
  • Select the destination folder, where the project will be generated. Once the project is generated, you may either add the project to the current workspace or open in a new window:
srcmainjava and srcmainwebapp folder
  • As you can see, the project has a basic structure with srcmainjava and srcmainwebapp folders:
project has a basic structure

Running the Payara Micro Application:

  • In the explorer sidebar (or Payara activity bar), expand Payara Micro Instances, right click on the instance and select start:
expand Payara Micro Instances
  • After starting the instance, you may see the Payara Micro application log in the OUTPUT window:
Payara Micro application log in the OUTPUT window
  • Similarly you may also start the instance in the debug mode and you may also modify the debug configuration from the launch.json config named “payara-micro”.
start the instance in the debug mode

Advanced Settings

JDK Home Path

To modify the JDK Home Path of the application, right click on the Payara Micro instance, select JDK Home and browse the JDK Home path:

modify the JDK Home Path of the application

You may also modify the jdk home path setting from the settings.json by updating the java.home property.

modify the jdk home path setting from the settings.json

Customize Build Commands:

Payara Micro application lifecycle commands like start, stop, reload and bundle can be modified as per developer choice by overriding these command instructions in the tasks.json.

commands like start, stop, reload and bundle can be modified

Now that we can run Payara Micro applications without leaving VSCode, it’s time to write some code! For inspiration, check out the Payara Examples repository on GitHub for some sample applications.

Download Payara Micro
{{cta(‘908761da-2736-4afd-b6e5-023e5a101b91’)}}

 

 

Comments (6)

Post a comment

Your email address will not be published. Required fields are marked *

Payara needs the contact information you provide to us to contact you about our products and services. You may unsubscribe from these communications at any time. For information on how to unsubscribe, as well as our privacy practices and commitment to protecting your privacy, please review our Legal & Privacy Policy.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  1. Humberto Dias

    Great extension, works really well with the standalone version!
    Would be great if this extension were also supported by visual studio online – https://github.com/cdr/code-server

    Imagine to have a embedded online ide with hot deployment of my payara micro project 😉

  2. Humberto Dias

    Using this extension on vscode online
    https://github.com/humbertodias/payara-ide
    Thanks

  3. Gaurav Gupta

    Hi Humberto, Thanks for using the Payara tools and sharing the info for code-server, we will review and update.

  4. Shane McKee

    Thanks for the blog! I followed all of the instructions and everything completed with out error. All of the maven plugins and dependencies look fine. When I expand the Payara Micro Instances pane on the left there is not a Payara Micro Instance. I have tried a couple different versions of the archetype but none of them end up creating an instance. Am I missing a step or is there a manual way to add the instance?

  5. Gaurav Gupta

    Hi Shane,

    Use payara-micro-maven-archetype to create the Payara Micro project, Payara VSCode tools already supports generating new Payara Micro project. If the Payara Micro instance is not visible in the side panel then check the existence of the payara-micro-maven-plugin in pom.xml and also share the log from the Developer console (F12) for further assistance.

  6. Sergius

    How to configure maven home? payara tool says to me something like “error execute maven because maven home not found”. indeed my system doesn’t have maven_home, m2_home, etc. but maven works fine outside vscode.

Related Posts

Webinar banner for “High-Frequency Trading on Jakarta EE: GC Stress Testing with Azul C4 and Payara Micro,” March 25, 2026, 2 PM GMT. Features Azul and Payara Micro logos and speaker photos of Luqman Saeed, Jakarta EE Specialist, and Simon Ritter, Deputy CTO and Java Champion. 1 minute
Cloud & Microservices

High-Frequency Trading on Jakarta EE: Join Our Upcoming Live Webinar

Modern high-frequency trading (HFT) platforms operate under extreme performance constraints, processing tens of thousands of messages per second while […]

Illustration promoting the Payara Platform Community Survey, featuring bold text on a blue background alongside a clipboard with a checklist, star ratings, and check marks, with coral and fish graphics in an underwater theme. 1 minute
Community

Help Shape the Future of Payara Platform Community – Take Our 2026 Survey

Earlier this week, we’ve launched the 2026 Payara Platform Community Survey and we’d love to hear from you. If […]

Cut Jakarta EE Startup Times from Seconds to Milliseconds with CRaC 8 minutes
Jakarta EE

Cut Jakarta EE Startup Times from Seconds to Milliseconds with CRaC 

Jakarta EE applications can take anywhere from several seconds to over a minute to start, depending on their size […]