-
Notifications
You must be signed in to change notification settings - Fork 16
Troubleshooting
The main potential cause of problems is the JDK/Scala configuration.
Modbat is compiled using gradle, which automatically pulls the right Java version (11 at the time of writing) and Scala version (2.11 as of now) for compilation.
At run-time, however, the configuration of the local system is used. This also applies if you use the scripts from the tutorial.
If the Java and Scala versions of your system does not match the one used by gradle, you will get a message such as:
java.lang.UnsupportedClassVersionError: modbat/mbt/ExtraArgumentsException has been compiled by a more recent version of the Java Runtime (class file version 56.0), this version of the Java Runtime only recognizes class file versions up to 52.0.
In this case, the local JDK is configured to be older than the one used for compilation.
-
Check the output of
java -version
; it should match the version used by Modbat in the compilation. -
Use
export JAVA_HOME=...
to set the right default Java version. The exact value is system dependent, but a web search for "Java version JAVA_HOME [OS_NAME]" finds the right information for the given value of [OS_NAME] (use your operating system there).
-
Check the output of
scala -version
; it should match the version used by Modbat in the compilation. -
Make sure the right version of Scala appears first in your PATH, or use other ways to select it as default.