Changeset 35663


Ignore:
Timestamp:
2021-10-21T19:39:04+13:00 (3 years ago)
Author:
davidb
Message:

Some tidy up to print statements, and Vendor test expanded to be inclusive of OpenJDK

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/Gatherer.java

    r34544 r35663  
    316316            // check that we are using Sun Java
    317317            String java_vendor = System.getProperty("java.vendor");
     318            String java_runtime_name = System.getProperty("java.runtime.name");
     319
     320           
    318321            if (!java_vendor.equals("Sun Microsystems Inc.")
    319                 && !java_vendor.equals("Oracle Corporation")) {
    320                 System.err.println(Dictionary.get("General.NotSunJava", java_vendor));
     322                && !java_vendor.equals("Oracle Corporation")
     323                && !java_runtime_name.equals("OpenJDK Runtime Environment")) {
     324                // OK, so the dictionary key label is a bit apocryphal these days, but it gets the job done
     325                System.err.println(Dictionary.get("General.NotSunJava", java_vendor));
    321326            }
    322327
     
    421426                        // (tomcat and networked Derby Server) by calling GS3ServerThread.stopServer()
    422427                        if(!GS3ServerThread.wasServerLaunchedOutsideGLI()) {
    423                             System.err.println("Attempting to forcibly terminate the GS server...");
     428                            System.err.println("Attempting to forcibly terminate the GS server...");
    424429                            GS3ServerThread.stopServer();
    425430                        } else {
    426                             System.err.println("@@@ Tomcat was launched outside GLI. Leaving it running...");
     431                            System.err.println("Tomcat was launched outside GLI. Leaving it running...");
    427432                        }
    428433                        } else { // issue the call to stop any running GS2 local library server
    429434                        if (LocalLibraryServer.isRunning() == true) {
    430                             System.err.println("Attempting to forcibly terminate the GS server...");
     435                            System.err.println("Attempting to forcibly terminate the GS server...");
    431436                            LocalLibraryServer.forceStopServer();
    432437                        }
     
    836841            GS3ServerThread.stopServer();
    837842            } else {
    838             System.err.println("@@@ Tomcat was launched outside GLI. Leaving it running...");
     843            System.err.println("Tomcat was launched outside GLI. Leaving it running...");
    839844            }
    840845           
     
    11391144
    11401145        if (Configuration.library_url == null){
    1141             System.out.println("Error: you have not provided the Greenstone Library address."); 
     1146            System.err.println("Error: you have not provided the Greenstone Library address."); 
    11421147            return;
    11431148
     
    18271832                    cmd_list.add(Configuration.perl_path);
    18281833                } else {
    1829                     System.err.println("***** ImageMagickTest Warning: Perl_path not set, calling 'perl' instead.");
     1834                    System.err.println("Warning: ImageMagickTest::found() perl_path not set, calling 'perl' instead.");
    18301835                    cmd_list.add("perl");
    18311836                }
Note: See TracChangeset for help on using the changeset viewer.