WEB应用中间件自动关闭问题

来源:互联网 发布:局域网网管软件 编辑:程序博客网 时间:2024/06/06 14:29

当代码中存在System.exit()之类的代码时,会关闭当前应用程序。

 

exit
public   static   void   exit(int   status)
Terminates   the   currently   running   Java   Virtual   Machine.   The   argument   serves   as   a   status   code;   by   convention,   a   nonzero   status   code   indicates   abnormal   termination.  
This   method   calls   the   exit   method   in   class   Runtime.   This   method   never   returns   normally.  

The   call   System.exit(n)   is   effectively   equivalent   to   the   call:  

  Runtime.getRuntime().exit(n)
 
Parameters:
status   -   exit   status.
Throws:
SecurityException   -   if   a   security   manager   exists   and   its   checkExit   method   doesn 't   allow   exit   with   the   specified   status.
See   Also:  
Runtime.exit(int)

原创粉丝点击