From 634a6914137748d341d0295bee06a60d4fb267d5 Mon Sep 17 00:00:00 2001 From: Toshi Nagata Date: Mon, 10 Oct 2022 23:12:53 +0900 Subject: [PATCH] Checking Java availability is improved --- Scripts/gamess.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Scripts/gamess.rb b/Scripts/gamess.rb index 346f8bf..1b3dbcd 100755 --- a/Scripts/gamess.rb +++ b/Scripts/gamess.rb @@ -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 -- 2.11.0