From: Ben Soares Date: Wed, 21 Jul 2021 11:32:31 +0000 (+0100) Subject: JAL-3850 using reflection for SimpleHttpFileServerFactory X-Git-Tag: Release_2_11_2_0~42 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=bec6abe894ca14c42017dfc8c30033e408a2d427;p=jalview.git JAL-3850 using reflection for SimpleHttpFileServerFactory --- diff --git a/build.gradle b/build.gradle index 41a972b..56140e6 100644 --- a/build.gradle +++ b/build.gradle @@ -2947,7 +2947,13 @@ task jalviewjsServer { def htmlFile = "${jalviewDirAbsolutePath}/${filename}" doLast { - SimpleHttpFileServerFactory factory = new SimpleHttpFileServerFactory() + def factory + try { + def class = Class.forName("SimpleHttpFileServerFactory") + factory = class.newInstance() + } catch (ClassNotFoundException e) { + throw new GradleException("Unable to create SimpleHttpFileServerFactory") + } def port = Integer.valueOf(jalviewjs_server_port) def start = port def running = false