我java用的多多一点点,还处于初级阶段,请多多指教.
:(可其他工具更加不熟.

解决方案 »

  1.   

    windows api是c函数,再研究一下windows的sdk吧
      

  2.   

    Run JAVA as a NT service
    You can use the utility SRVANY.EXE, included with the NT resource Kit. 
    Or in the Microsoft SDK 2.0, a package called com.ms.service that provides ways to a Java classes as a service. Some utilities and demos are included. Check the Microsoft JAVA Web site for more infos.
    Finally you may want to take a look at invoker, a freeware equivalent of MS srvany.exe for running executables as services.
    If you log in and log out from a machine and a java service is running then the service may be stopped. The fix is to use Java 1.3.1 or higher and start the process with the JVM switch -Xrs (Reduce Signals Xtended-switch) to stop the Windows signal from killing the JVM. 
    http://www.eworksmart.com/JNT/