Home News Products Shop Contact CSCare Inc.

JWinSvc

NEW! - JWinSvc 1.3c available!

JWinSvc is a Java wrapper designed for Windows NT/2000/XP/2003 which enables to run your Java applications as usual NT services. JWinSvc can be used to install and uninstall Java applications as well as to start and stop them. Moreover, you can force your Java applications to shut down smoothly, avoiding malfunction or crash.

For every Java application run by JWinSvc as an NT service, you can rename the particular JWinSvc to distinguish the applications running at the same time.

In addition, it is possible to set a working directory for your application, service applet name, and service applet description which appears in Task Manager and event logs.

The Advantages of JWinSvc

  • enables to install and run Java applications as NT services on Windows NT, 2000, XP and 2003 Server platforms
  • easily installs, starts, stops and uninstalls Java applications as services
  • permits to specify service dependencies and allows services to interact with desktop
  • provides several effective options to terminate Java applications smoothly when service stop is called, including a new unique method "System.exit() injection"
  • supports Service Recovery in Service Control Manager for wrapped Java applications running with JWinSvc as services
  • offers an option to specify a "startup method"
  • enables to specify the preferred Java runtime library to be loaded when launching an application
  • implemented as a sole exe file
  • no need to re-compile or alter the installed Java applications
  • supports latest Java 6 platform, Java 5, and all older JDKs with JNI (Java Native Interface, since JDK 1.2).
  • keeps the Java command line syntax and survives user logoff
  • allows to rename itself in order to provide a better identification of the service in "Processes" in Task Manager
  • application’s System.out output displayed in Event Viewer can be optionally copied to a log file
  • options to set the startup type of the installed service as well as the priority of the started service are implemented

Principles of Operation

The picture below shows the conceptual schema of JWinSvc operation:

diagram

  • JWinSvc takes over the control of start and stop signals as well as signals to Event Viewer. The consequence is that the wrapped Java application acts as a usual NT service (having its name and description displayed in Task Manager and event logs, etc...).
  • When the stop request is received, JWinSvc tries to shutdown the Java application smoothly using the following approaches:

    1. JwinSvc uses "System.exit() injection" that calls System.exit() via JNI in a way as if the application itself called System.exit().
    2. If there is an external utility that takes care for stopping the Java application correctly, it can be called by specifying the /shutdownComand command line parameter.
    3. In case that the Java application has a "shutdown" method implemented, it can be called by specifying the /shutdown command line parameter.

  • Shutdown methods and their usage with examples are described on the FAQ/How to shutdown a Java application correctly page.
For more information about available commands and options, consult the User's Guide page.
Trap Console