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.)
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.
}
}
-#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;