Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit f0d297c

Browse files
committed
Update this version check to support newer JRE versions (>=1.9)
1 parent fb9f38a commit f0d297c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/sage/interfaces/jmoldata.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@
2626
from sage.misc.temporary_file import tmp_filename
2727
from sage.cpython.string import bytes_to_str
2828

29-
import subprocess
3029
import os
30+
import re
31+
import subprocess
3132

3233
class JmolData(SageObject):
3334
r"""
@@ -65,8 +66,7 @@ def is_jvm_available(self):
6566
except (subprocess.CalledProcessError, OSError):
6667
return False
6768

68-
import re
69-
java_version = re.search("version.*[1][.][78]", version)
69+
java_version = re.search('version.*([1][.][789]|"\d+")', version)
7070
return java_version is not None
7171

7272
def export_image(self,

0 commit comments

Comments
 (0)