]> Savannah Git Hosting - gnulib.git/commitdiff
javaexec: Remove support for 'jview'.
authorBruno Haible <bruno@clisp.org>
Fri, 9 Jun 2023 12:57:07 +0000 (14:57 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 9 Jun 2023 12:57:07 +0000 (14:57 +0200)
* lib/javaexec.c (execute_java_class): Don't test for jview.

ChangeLog
lib/javaexec.c

index 7ddf1233863b6ce79e79a6e3f26ca7fe25c67c14..40ab73d0e26ca680c47d89d79120d55e78e93f36 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2023-06-09  Bruno Haible  <bruno@clisp.org>
 
+       javaexec: Remove support for 'jview'.
+       * lib/javaexec.c (execute_java_class): Don't test for jview.
+
        javaexec-script: Remove support for 'jview'.
        * build-aux/javaexec.sh.in: Don't test HAVE_JVIEW.
        * m4/javaexec.m4 (gt_JAVAEXEC): Don't set HAVE_JVIEW. Don't set
index 0c2c02854dc5c93f37f9589f8fbbc2b8e334400f..fb72fdc675b806d0d272b16d9360743f68571bda 100644 (file)
@@ -52,7 +52,6 @@
    java       JDK 1.1.8    Y Y  -classpath P   java -version 2>/dev/null
    jre        JDK 1.1.8    N Y  -classpath P   jre 2>/dev/null; test $? = 1
    java       JDK 1.3.0    Y Y  -classpath P   java -version 2>/dev/null
-   jview      MS IE        Y Y  -cp P          jview -? >nul; %errorlevel% = 1
 
    The CLASSPATH is a colon separated list of pathnames. (On Windows: a
    semicolon separated list of pathnames.)
@@ -62,8 +61,7 @@
         preferences,
      2. "gij", because it is a completely free JVM,
      3. "java", because it is a standard JVM,
-     4. "jre", comes last because it requires a CLASSPATH environment variable,
-     5. "jview", on Windows only, because it is frequently installed.
+     4. "jre", comes last because it requires a CLASSPATH environment variable.
 
    We unset the JAVA_HOME environment variable, because a wrong setting of
    this variable can confuse the JDK's javac.
@@ -364,64 +362,6 @@ execute_java_class (const char *class_name,
       }
   }
 
-#if defined _WIN32 || defined __CYGWIN__
-  /* Native Windows, Cygwin */
-  {
-    static bool jview_tested;
-    static bool jview_present;
-
-    if (!jview_tested)
-      {
-        /* Test for presence of jview: "jview -? >nul ; test $? = 1"  */
-        const char *argv[3];
-        int exitstatus;
-
-        argv[0] = "jview";
-        argv[1] = "-?";
-        argv[2] = NULL;
-        exitstatus = execute ("jview", "jview", argv, NULL,
-                              false, false, true, true,
-                              true, false, NULL);
-        jview_present = (exitstatus == 0 || exitstatus == 1);
-        jview_tested = true;
-      }
-
-    if (jview_present)
-      {
-        char *old_classpath;
-        const char **argv =
-          (const char **) xmalloca ((2 + nargs + 1) * sizeof (const char *));
-        unsigned int i;
-
-        /* Set CLASSPATH.  */
-        old_classpath =
-          set_classpath (classpaths, classpaths_count, use_minimal_classpath,
-                         verbose);
-
-        argv[0] = "jview";
-        argv[1] = class_name;
-        for (i = 0; i <= nargs; i++)
-          argv[2 + i] = args[i];
-
-        if (verbose)
-          {
-            char *command = shell_quote_argv (argv);
-            printf ("%s\n", command);
-            free (command);
-          }
-
-        err = executer ("jview", "jview", argv, private_data);
-
-        /* Reset CLASSPATH.  */
-        reset_classpath (old_classpath);
-
-        freea (argv);
-
-        goto done2;
-      }
-  }
-#endif
-
   if (!quiet)
     error (0, 0, _("Java virtual machine not found, try installing gij or set $JAVA"));
   err = true;