webserver.Start
Dim jo As JavaObject = webserver
Dim HandlerCollection As JavaObject = jo.GetFieldJO("server").RunMethod("getHandler", Null)
Dim Handlers() As Object = HandlerCollection.RunMethod("getHandlers", Null)
For Each Handler As JavaObject In Handlers
Dim class As String = Handler.RunMethod("getClass",Null)
If class = "class org.eclipse.jetty.server.handler.RequestLogHandler" Then
Dim RequestLog As JavaObject = Handler.RunMethodJO("getRequestLog",Null)
If File.DirApp.StartsWith("/") Then
RequestLog.RunMethod("setFilename",Array("/dev/null"))
Else
RequestLog.RunMethod("setFilename",Array("NUL"))
End If
Handler.RunMethod("setRequestLog",Array(RequestLog))
End If
Next
jo.GetFieldJO("server").RunMethod("stop", Null)
jo.GetFieldJO("server").RunMethod("start", Null)
StartMessageLoop