From: Sam Ruby Date: Tue, 27 Jun 2000 10:37:40 +0000 (+0000) Subject: defer loading of the native code X-Git-Tag: php-4.0.1RC2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e216b8918e3e0a25e4ae8791dfb31421319160a6;p=php defer loading of the native code --- diff --git a/sapi/servlet/servlet.java b/sapi/servlet/servlet.java index b69d482e27..c085488309 100644 --- a/sapi/servlet/servlet.java +++ b/sapi/servlet/servlet.java @@ -42,7 +42,6 @@ public class servlet extends HttpServlet { /* native methods */ /******************************************************************/ - static { reflect.loadLibrary("servlet"); } public native void startup(); public native long define(String name); public native void send(String requestMethod, String queryString, @@ -124,7 +123,12 @@ public class servlet extends HttpServlet { public void init(ServletConfig config) throws ServletException { super.init(config); - if (0 == startup_count++) startup(); + + // first time in, initialize native code + if (0 == startup_count++) { + reflect.loadLibrary("servlet"); + startup(); + } // try to find the addHeader method (added in the servlet API 2.2) // otherwise settle for the setHeader method