简体   繁体   中英

How to deploy a Java Play App in production using a Windows environment?

I have built a Java Play app using the latest version. Currently I am running the application using the batch file that gets generated. There's a zip file created inside target->universal folder (When I go to the bin folder inside the extracted folder this batch file is available).

How can I run this in production Windows environment? This play app is a backend service that needs to run continuously. Should this be created as a Windows Service? As in, should I try to run this batch file as a Windows Service through some means? I can't find any online references on this. Any help would be much appreciated.

There are service wrappers available, that can take almost any arbitrary application and run it as a service or daemon on some operating systems. I would highly recommend that you avoid them. Writing secure, performant services for Windows is not trivial. You can however run any script using Windows TaskManager (GUI) or Task Scheduler , and it has all the knobs you need to easily control how your application runs, when it starts and what to do if it crashes.

See schtasks.exe for command line interface reference.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM