古いJavaが入った環境でMSG Viewer ver 1.10を実行したら、新しいJavaバージョンを要求された。
C:\tmp>java -version
java version "1.8.0_211"
Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
Java HotSpot(TM) Client VM (build 25.211-b12, mixed mode)
C:\tmp>java -jar X:\tmp\windows\msgviewer.jar
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: net/sourceforge/MSGViewer/ModuleLauncher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
C:\tmp>j
このような新しいJavaが入ってないWindows環境で一時的に試すのであればMicrosoft Build of OpenJDK から「Windows X64 zip」のファイル、例えば microsoft-jdk-17.0.2.8.1-windows-x64.zip をダウンロードし、適当なフォルダに展開。
中にあるbin\java.exe をフルパスで指定して実行するとよい。
下記はMicrosoft OpenJDK 17.0.2.8.1 で MSGViewer ver 1.10を実行した例
C:\tmp>X:\tmp\windows\jdk-17.0.2+8\bin\java.exe -version
openjdk version "17.0.2" 2022-01-18 LTS
OpenJDK Runtime Environment Microsoft-30338 (build 17.0.2+8-LTS)
OpenJDK 64-Bit Server VM Microsoft-30338 (build 17.0.2+8-LTS, mixed mode, sharing)
C:\tmp>X:\tmp\windows\jdk-17.0.2+8\bin\java.exe -jar X:\tmp\windows\msgviewer.jar
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
HSWShellExec_amd64.dll loaded via tmp generated pathname: C:\Users\xxxxxxxxxxxxxxx\AppData\Local\Temp\HSWShellExec-12653163171875368309.dll
All Windows closed, normal exit
C:\tmp>