Description: avoid using classgraph, not needed to find the Debian jar
Author: Pierre Gruet <pgt@debian.org>
Forwarded: not-needed
Last-Update: 2020-11-16

--- a/test/jalview/bin/CommandLineOperations.java
+++ b/test/jalview/bin/CommandLineOperations.java
@@ -37,9 +37,6 @@
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
-import io.github.classgraph.ClassGraph;
-import io.github.classgraph.ModuleRef;
-import io.github.classgraph.ScanResult;
 import jalview.gui.JvOptionPane;
 
 public class CommandLineOperations
@@ -119,49 +116,18 @@
     }
   }
 
-  private static ClassGraph scanner = null;
-
   private static String classpath = null;
 
   private static String modules = null;
 
   private static String java_exe = null;
 
-  public synchronized static String getClassPath()
-  {
-    if (scanner == null)
-    {
-      scanner = new ClassGraph();
-      ScanResult scan = scanner.scan();
-      classpath = scan.getClasspath();
-      modules = "";
-      for (ModuleRef mr : scan.getModules())
-      {
-        modules.concat(mr.getName());
-      }
-      java_exe = System.getProperty("java.home") + File.separator + "bin"
-              + File.separator + "java";
-
-    }
-    while (classpath == null)
-    {
-      try
-      {
-        Thread.sleep(10);
-      } catch (InterruptedException x)
-      {
-
-      }
-    }
-    return classpath;
-  }
-
   public static Worker getJalviewDesktopRunner(boolean withAwt, String cmd,
           int timeout)
   {
     // Note: JAL-3065 - don't include quotes for lib/* because the arguments are
     // not expanded by the shell
-    String classpath = getClassPath();
+    String classpath = new String("/usr/share/java/jalview.jar");
     String _cmd = java_exe + " "
             + (withAwt ? "-Djava.awt.headless=true" : "") + " -classpath "
             + classpath
--- a/test/jalview/bin/HiDPISettingTest2.java
+++ b/test/jalview/bin/HiDPISettingTest2.java
@@ -35,8 +35,6 @@
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
-import io.github.classgraph.ClassGraph;
-import io.github.classgraph.ScanResult;
 import jalview.gui.Desktop;
 import jalview.util.Platform;
 
@@ -94,39 +92,13 @@
     }
   }
 
-  private static ClassGraph scanner = null;
-
   private static String classpath = null;
 
   private static String java_exe = null;
 
-  public synchronized static String getClassPath()
-  {
-    if (scanner == null)
-    {
-      scanner = new ClassGraph();
-      ScanResult scan = scanner.scan();
-      classpath = scan.getClasspath();
-      java_exe = System.getProperty("java.home") + File.separator + "bin"
-              + File.separator + "java";
-
-    }
-    while (classpath == null)
-    {
-      try
-      {
-        Thread.sleep(10);
-      } catch (InterruptedException x)
-      {
-
-      }
-    }
-    return classpath;
-  }
-
   private Worker getJalviewDesktopRunner(String jvmArgs, String appArgs)
   {
-    String classpath = getClassPath();
+    String classpath = new String("/usr/share/java/jelview.jar");
     String cmd = java_exe + " " + " -classpath " + classpath + " " + jvmArgs
             + " jalview.bin.Jalview " + " "
             + "--props=test/jalview/bin/hidpiTestProps.jvprops " + appArgs;
--- a/test/jalview/util/Log4jTest.java
+++ b/test/jalview/util/Log4jTest.java
@@ -32,8 +32,6 @@
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 
-import io.github.classgraph.ClassGraph;
-import io.github.classgraph.ScanResult;
 import jalview.bin.Console;
 
 public class Log4jTest
@@ -90,39 +88,14 @@
     }
   }
 
-  private static ClassGraph scanner = null;
 
   private static String classpath = null;
 
   private static String java_exe = null;
 
-  public synchronized static String getClassPath()
-  {
-    if (scanner == null)
-    {
-      scanner = new ClassGraph();
-      ScanResult scan = scanner.scan();
-      classpath = scan.getClasspath();
-      java_exe = System.getProperty("java.home") + File.separator + "bin"
-              + File.separator + "java";
-
-    }
-    while (classpath == null)
-    {
-      try
-      {
-        Thread.sleep(10);
-      } catch (InterruptedException x)
-      {
-
-      }
-    }
-    return classpath;
-  }
-
   private Worker getJalviewDesktopRunner(String appArgs)
   {
-    String classpath = getClassPath();
+    String classpath = new String("/usr/share/java/jalview.jar");
     String cmd = java_exe + " " + " -classpath " + classpath + " "
             + " jalview.bin.Jalview " + " "
             + "--props=test/jalview/util/log4jTestProps.jvprops " + appArgs;
