Deploying Java Applications Via Command Line Interface At SANGKRIT.net

There are two interfaces of deploying Java Applications – The file manager interface and the command line interface. SANGKRIT.net hosting and servers provide you cPanel management from where you can deploy your Java applications.

As we have discussed before, many Java applications ship in WAR packages which means Web Application Archive, which can be installed on your server.

To deploy a Java WAR package via the command line, first upload your Java WAR package to your public_html directory.

Then, run the unzip filename.war command to extract the package, where filename.war represents the name of your Java WAR package file.

Open the .htaccess file with a text editor and add the following text:

SetHandler jakarta-servlet

SetEnv JK_WORKER_NAME ajp13

Now save your changes and access your Java application using this URL pattern –

http://domain.com/subdirectory/yourjavaapplication

Where,

  1. Domain.com represents your domain name.
  2. Subdirectory represents the Java application’s directory.
  3. Yourjavaapplet represents the Java application’s name.

That’s it. Your Java applications are ready to use.

If you cannot access your server via SSH, you must use cPanel’s File Manager interface on your cPanel -> Home -> Files -> File Manager, read more about this method here.

Leave a Reply

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