Run any Java app as a Windows Service with AlwaysUp

How to Run Any Java Application 24/7 as a Windows Service with AlwaysUp

Ensure that your Java program (or JAR) starts automatically after a reboot and is auto-restarted if it crashes or stops for any reason. No need to log in


Last Updated on April 22, 2026

Java is an established, cross-platform application environment developed and maintained by Oracle. It has been powering client and server applications worldwide since 1996.

But being platform independent, Java doesn't natively support Windows Services. There's no built-in way to start a JAR at boot and keep it running 24/7 on Windows.

Don't worry, though — AlwaysUp fills that gap. Follow the steps below to create a bulletproof service from your important Java program, in only a few minutes. Let's go!


To install and run your Java application as a Windows Service with AlwaysUp:

  1. If necessary, download and install your favorite Java distribution. Choose from any of the major players, such as:

    Afterwards, make sure that you can run your Java application from the command line. For example, if you have a JAR file, confirm that this command works as you expect:

    java -jar [FULL-PATH-TO-YOUR-JAR-FILE]

    This is important: if your Java app doesn't work from the command line, it won't work as a background service either.

  2. Download and install AlwaysUp, if necessary.

  3. Start AlwaysUp.

  4. Select Application > Advisor to launch the Application Advisor:

    Start Application Advisor

  5. Click Next to move past the welcome screen:

    Application Advisor: Introduction

  6. Choose Java (JAR/WAR) from the list of applications and click Next:

    Application Advisor: Select Java/JAR

  7. The Advisor will take a few seconds to examine your computer and gather information about your Java installation. After that, it will prompt you to enter the full path to the JAR file you want to run as a service:

    Java Application Advisor: Enter JAR file

    Click Next to move on.

  8. On this screen, enter the password of your Windows account. Your application will run in this context since Java is set up correctly there:

    Java Application Advisor: Enter Windows Credentials

    Click Next to move on.

  9. As the screen says, the Advisor has composed the best settings to run your JAR as a Windows Service. Click Next to open the Add Application window with all the particulars.

    Java Application Advisor: Ready to add your application

  10. At this point, the Add Application window contains all the recommended settings for running your JAR 24x7 after your PC boots. You can cycle through the tabs and review the options that have been chosen.

    And on the General tab, feel free to change the name to something you prefer.

    When you're ready, click Save to record your new Java service:

    Save your Java Windows Service settings

  11. In a few seconds, a new entry for your Java app will show up in the AlwaysUp window. However, the state will be "Stopped" because the service is not yet running:

    Java Windows Service installed

  12. Finally, to launch your Java program as a service, choose Application > Start. The entry will soon change to Running and Java will be doing its thing in the background:

    Java Windows Service running

  13. And that's it! Next time your computer boots, your Java app will start up immediately, before anyone logs on.

    We encourage you to edit Java in AlwaysUp and check out the many other settings that may be appropriate for your environment.

    For example, you can:


Java application not working properly as a Windows Service?

  • To capture diagnostic output and error messages from Java.exe, edit your application in AlwaysUp, check the Capture output to this log file box on the Extras tab and specify the path to a text file. Please review the contents of the file after a failed run.

  • Consult the AlwaysUp Troubleshooter — our online tool that can help you resolve the most common problems encountered when running an application as a Windows Service.

  • From AlwaysUp, select Application > Report Activity > Today to bring up an HTML report detailing the interaction between AlwaysUp and your Java application. The AlwaysUp Event Log Messages page explains the more obscure messages.

  • Browse the AlwaysUp FAQ for answers to commonly asked questions and troubleshooting tips.

  • Contact us and we will be happy to help!

Our 14,000+ customers include...
AlwaysUp is fully compatible with Windows 11 AlwaysUp is fully compatible with Windows Server 2025
Over 97,000 installations, and counting!
 
AlwaysUp is number 1! Run as a Service with AlwaysUp

Rock-solid for the past 20+ years!