From bec6abe894ca14c42017dfc8c30033e408a2d427 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Wed, 21 Jul 2021 12:32:31 +0100 Subject: [PATCH] JAL-3850 using reflection for SimpleHttpFileServerFactory --- build.gradle | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- 1.7.10.2