Skip to content

Commit

Permalink
Fixed discovery of Comsol 6.0 on Linux. (#67)
Browse files Browse the repository at this point in the history
The relative location of `libjvm.so` has changed between Comsol 5.6
and 6.0, probably because the vendored JDK was upgraded from 8 to 11.
We now simply check both locations.

Also removed a check for `libjvm.so` on macOS, which is most probably
doing nothing there.
  • Loading branch information
john-hen committed Feb 23, 2022
1 parent 86d1b16 commit 3b23e76
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions mph/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,13 @@ def search_Linux():
if not java.exists():
log.debug('Did not find Java run-time binaries.')
continue
jvm = jre/'lib'/'amd64'/'server'/'libjvm.so'
jvm = jre/'lib'/'server'/'libjvm.so'
if not jvm.exists():
log.debug('Did not find Java virtual machine.')
continue
# Old location, up until Comsol 5.6.
jvm = jre/'lib'/'amd64'/'server'/'libjvm.so'
if not jvm.exists():
log.debug('Did not find Java virtual machine.')
continue
api = root/'plugins'
if not api.exists():
log.debug('Did not find Comsol Java API plug-ins.')
Expand Down Expand Up @@ -347,10 +350,8 @@ def search_macOS():
continue
jvm = jre/'Contents'/'Home'/'lib'/'server'/'libjvm.dylib'
if not jvm.exists():
jvm = jre/'Contents'/'Home'/'lib'/'server'/'libjvm.so'
if not jvm.exists():
log.debug('Did not find Java virtual machine.')
continue
log.debug('Did not find Java virtual machine.')
continue
api = root/'plugins'
if not api.exists():
log.debug('Did not find Comsol Java API plug-ins.')
Expand Down

0 comments on commit 3b23e76

Please sign in to comment.