Open In App

How to Deploy Java Apps on JBoss Server

Last Updated : 26 Aug, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

JBoss, now known as WildFly, is an open-source and lightweight Java-based application server developed by Red Hat which is used for deploying, hosting, and running Java applications. To deploy a Java application on JBoss we package it as a Web Application (WAR) File or Enterprise Application (EAR) File and then upload it for deployment.

Key Features of JBoss/WildFly

  • Fully understandable with Java Enterprise Edition.
  • It is built on a highly modular architecture.
  • Can handle workloads efficiently through scaling.
  • It is open-source and therefore anyone can use it.

Prerequisites

  • Java Development Kit (JDK) must be installed.
  • Download and install the JBoss Server on your machine.

NOTE: Avoid using the JBoss version that is significantly older or newer than the JDK version to avoid compatibility issues. For example: If you are using JDK 21, ensure that you are using JBoss version that supports JDK 21.

Step-by-Step Process To Deploy Java Application in JBoss Server

1. Installing JBoss Server:

  • Visit the official website and download the zip file of the JBoss version you need to install.
  • Extract the downloaded zip file to the desired location.

2. Setting JBoss environment :

  • Add the path of the JBoss directory to an environment variable with the name JBOSS_HOME.
setting environment variable for JBoss

3. Start JBoss Server

  • Navigate to JBoss bin directory and run "standalone.bat" (for Windows) and "standalone.sh" (for Linux/Mac) file to start server.

4. Open JBoss Admin Console

  • You can access JBoss Admin Console at "http://localhost:9990".

5. Deploy Java Application

  • When you navigate to "http://localhost:9990" a management console will get open. In the management console, go to Deployments Section. Under it click to add icon and select Upload Deployment option.
navigate to deployment section and click upload deployment

Now click on the "Choose a file" to browse local file system and select the WAR file you need to deploy and then confirm the upload by clicking the next button.

Upload .WAR file and click next

Now it will ask for name and runtime name for your java application. This name will be used to identify your java application on server. By default runtime name is same as WAR file name, but we can change it if needed. You can set any name here specific to your java application and click finish button to finalize the deployment process.

Specify name of file you want to enter and click finish.

Now you will see "Deployment Successful" on your screen which shows your application is successfully deployed. Now you can view deployment also.

As soon as finish is clicked Java application would be successfully deployed.

Once your java application is deployed, on the deployment page your newly deployed application would be listed which indicates that your application is deployed.

We can view the deployment we made

Next Article
Article Tags :

Similar Reads