icyphy / ptII

Ptolemy II is an open-source software framework supporting experimentation with actor-oriented design.
https://ptolemy.eecs.berkeley.edu/ptolemyII
Other
99 stars 43 forks source link

Added fix for new Java versioning convention #332

Closed mkowsiak closed 5 years ago

mkowsiak commented 5 years ago

This fix prevents from getting errors while running code with major releases of Java. Since release 9, Java has this strange convention of setting JVMs version to # and then, with further releases it becomes #.#.#.

It means, that with each new, major release, there is an error while evaluating this one:

Integer.parseInt(version.substring(0, dot));

mkowsiak commented 5 years ago

More info about macOS, Java, and new way of getting Java version can be found here:

http://www.owsiak.org/java-9-10-and-macos-issues-with-java-version/