OSDN Git Service

Checking Java availability is improved
authorToshi Nagata <alchemist.2005@nifty.com>
Mon, 10 Oct 2022 14:12:53 +0000 (23:12 +0900)
committerToshi Nagata <alchemist.2005@nifty.com>
Mon, 10 Oct 2022 14:12:53 +0000 (23:12 +0900)
Scripts/gamess.rb

index 346f8bf..1b3dbcd 100755 (executable)
@@ -1616,7 +1616,7 @@ class Molecule
         end
       end
     end
-    return call_subprocess("java -version", nil)
+    return (call_subprocess("java -version", nil) == 0)
   end
   
   def Molecule.make_java_available
@@ -2169,14 +2169,15 @@ class Molecule
         export_psi4(fname, hash)
       end
       if hash["execute_local"] == 1
-        @hf_type = hash["scftype"]
         if hash["run_janpa"] == 1
+          #  Check if Java is available
           if !Molecule.is_java_available()
             if !Molecule.make_java_available()
               return nil
             end
           end
         end
+        @hf_type = hash["scftype"]
         Molecule.execute_psi4(fname, self)
       end
     else