All is well with JDK 11.
Thanks for all of your help.
William

On Saturday, March 4, 2023 at 3:19:59 AM UTC-5 [email protected] wrote:

> Oops, you already sent the result. This is the nashorn error, same as for 
> JDK 18+.
>
> On Sat, Mar 4, 2023 at 3:18 AM Mario Carneiro <[email protected]> wrote:
>
>> That's the expected error when you run mmj2.jar without any arguments. 
>> Try running the bash script now.
>>
>> On Sat, Mar 4, 2023 at 2:03 AM William Mitchell Jr <[email protected]> 
>> wrote:
>>
>>> after apt install openjdk-17-jre,
>>>
>>> java --version:
>>> openjdk 17.0.6 2023-01-17
>>> OpenJDK Runtime Environment (build 17.0.6+10-Debian-1)
>>> OpenJDK 64-Bit Server VM (build 17.0.6+10-Debian-1, mixed mode, sharing)
>>>
>>> jar --version:
>>> jar 21-ea
>>>
>>> output of mmj2/mmj2jar/mmj2:
>>> https://pastebin.com/5Xgy1e0u
>>>
>>> output of java -jar mmj2/mmj2jar/mmj2.jar compiled and run with JDK 17:
>>> CommandLineArguments.displayArgumentOptionReport():
>>>
>>> Hi! I am mmj2 v2.5.3 as of 23-Sep-2019.
>>> Visit https://github.com/digama0/mmj2/ or
>>> http://code.google.com/p/metamath-mmj2/
>>> for support or bug reports.
>>>
>>>   Command Line Arguments:
>>>
>>>   [3] mmj2Path     = null (e.g. /home/wdmjun/YourFile.xyz)
>>>   [4] metamathPath = null (e.g. /home/wdmjun/YourFile.xyz)
>>>   [5] svcPath      = null (e.g. /home/wdmjun/YourFile.xyz)
>>>   [1] runParmFile  = null
>>>   [2] displayMMJ2FailPopupWindow 
>>>                    = true
>>>
>>> ***END CommandLineArguments.displayArgumentOptionReport()***
>>>
>>> mmj.pa.ErrorCode@5ef04b5A-UT-0007 RunParmFile not found or 
>>> SecurityException. Input file name = null System message follows: null
>>>
>>> William
>>> On Saturday, March 4, 2023 at 12:30:22 AM UTC-5 [email protected] wrote:
>>>
>>>> (FYI you have to pass arguments to the jar file if you don't want it to 
>>>> immediately quit with an error message, this is why the bash wrapper 
>>>> exists. But the missing .so error seems to happen first.) Googling this 
>>>> seems to suggest that your JDK 17 installation is broken, try reinstalling 
>>>> it. Does the indicated file 
>>>> "/usr/lib/jvm/java-17-openjdk-arm64/lib/libawt_xawt.so" exist?
>>>>
>>>> On Sat, Mar 4, 2023 at 12:26 AM William Mitchell Jr <[email protected]> 
>>>> wrote:
>>>>
>>>>> Oops.
>>>>> Output of java -jar mmj2/mmj2jar/mmj2.jar compiled and run with JDK 17:
>>>>>
>>>>> CommandLineArguments.displayArgumentOptionReport():
>>>>>
>>>>> Hi! I am mmj2 v2.5.3 as of 23-Sep-2019.
>>>>> Visit https://github.com/digama0/mmj2/ or
>>>>> http://code.google.com/p/metamath-mmj2/
>>>>> for support or bug reports.
>>>>>
>>>>>   Command Line Arguments:
>>>>>
>>>>>   [3] mmj2Path     = null (e.g. /home/wdmjun/YourFile.xyz)
>>>>>   [4] metamathPath = null (e.g. /home/wdmjun/YourFile.xyz)
>>>>>   [5] svcPath      = null (e.g. /home/wdmjun/YourFile.xyz)
>>>>>   [1] runParmFile  = null
>>>>>   [2] displayMMJ2FailPopupWindow 
>>>>>                    = true
>>>>>
>>>>> ***END CommandLineArguments.displayArgumentOptionReport()***
>>>>>
>>>>> mmj.pa.ErrorCode@5ef04b5A-UT-0007 RunParmFile not found or 
>>>>> SecurityException. Input file name = null System message follows: null
>>>>> Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load 
>>>>> library: /usr/lib/jvm/java-17-openjdk-arm64/lib/libawt_xawt.so
>>>>>         at 
>>>>> java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2393)
>>>>>         at java.base/java.lang.Runtime.load0(Runtime.java:755)
>>>>>         at java.base/java.lang.System.load(System.java:1953)
>>>>>         at java.base/jdk.internal.loader.NativeLibraries.load(Native 
>>>>> Method)
>>>>>         at 
>>>>> java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388)
>>>>>         at 
>>>>> java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232)
>>>>>         at 
>>>>> java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)
>>>>>         at 
>>>>> java.base/jdk.internal.loader.NativeLibraries.findFromPaths(NativeLibraries.java:315)
>>>>>         at 
>>>>> java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:285)
>>>>>         at 
>>>>> java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2398)
>>>>>         at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818)
>>>>>         at java.base/java.lang.System.loadLibrary(System.java:1989)
>>>>>         at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:1392)
>>>>>         at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:1390)
>>>>>         at 
>>>>> java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
>>>>>         at 
>>>>> java.desktop/java.awt.Toolkit.loadLibraries(Toolkit.java:1389)
>>>>>         at java.desktop/java.awt.Toolkit.initStatic(Toolkit.java:1427)
>>>>>         at java.desktop/java.awt.Toolkit.<clinit>(Toolkit.java:1401)
>>>>>         at java.desktop/java.awt.Color.<clinit>(Color.java:277)
>>>>>         at mmj.pa.PaConstants.<clinit>(PaConstants.java:863)
>>>>>         at 
>>>>> mmj.pa.ProofAsstPreferences.<init>(ProofAsstPreferences.java:339)
>>>>>         at 
>>>>> mmj.pa.ProofAsstPreferences.<init>(ProofAsstPreferences.java:266)
>>>>>         at mmj.pa.AuxFrameGUI.<init>(AuxFrameGUI.java:61)
>>>>>         at 
>>>>> mmj.util.MMJ2FailPopupWindow.showAuxFrameGUI(MMJ2FailPopupWindow.java:229)
>>>>>         at 
>>>>> mmj.util.MMJ2FailPopupWindow.displayFailMessage(MMJ2FailPopupWindow.java:119)
>>>>>         at mmj.util.BatchFramework.runIt(BatchFramework.java:243)
>>>>>         at mmj.util.BatchMMJ2.main(BatchMMJ2.java:53)
>>>>>
>>>>> William
>>>>>
>>>>> On Friday, March 3, 2023 at 11:55:29 PM UTC-5 [email protected] wrote:
>>>>>
>>>>>> This is the same error as before, you need to compile the java files 
>>>>>> using the same version as the one you use to run the jar file (in this 
>>>>>> case 
>>>>>> JDK 17). Since you are switching between versions it is likely you 
>>>>>> forgot 
>>>>>> to recompile and are using a class file from JDK 18+, as the error 
>>>>>> message 
>>>>>> says.
>>>>>>
>>>>>> On Fri, Mar 3, 2023 at 11:46 PM William Mitchell Jr <[email protected]> 
>>>>>> wrote:
>>>>>>
>>>>>>> java -jar mmj2/mmj2jar/mmj2.jar:
>>>>>>>
>>>>>>> Error: LinkageError occurred while loading main class 
>>>>>>> mmj.util.BatchMMJ2
>>>>>>>         java.lang.UnsupportedClassVersionError: mmj/util/BatchMMJ2 
>>>>>>> has been compiled by a more recent version of the Java Runtime (class 
>>>>>>> file 
>>>>>>> version 65.0), this version of the Java Runtime only recognizes class 
>>>>>>> file 
>>>>>>> versions up to 61.0
>>>>>>>
>>>>>>> William
>>>>>>> On Friday, March 3, 2023 at 11:25:01 PM UTC-5 [email protected] 
>>>>>>> wrote:
>>>>>>>
>>>>>>>> what is the regular output?
>>>>>>>>
>>>>>>>> On Fri, Mar 3, 2023 at 11:21 PM William Mitchell Jr <
>>>>>>>> [email protected]> wrote:
>>>>>>>>
>>>>>>>>> Here is the output of strace java -jar mmj2/mmj2jar/mmj2.jar:
>>>>>>>>>
>>>>>>>>> https://pastebin.com/eMMHSGLs
>>>>>>>>>
>>>>>>>>> William
>>>>>>>>> On Friday, March 3, 2023 at 10:26:40 PM UTC-5 [email protected] 
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> The strace output is not very informative because 
>>>>>>>>>> mmj2/mmj2jar/mmj2 is actually a shell script which calls java. Most 
>>>>>>>>>> of what 
>>>>>>>>>> you can see is just bash reading the script. You can call java 
>>>>>>>>>> directly if 
>>>>>>>>>> you want a more useful trace.
>>>>>>>>>>
>>>>>>>>>> On Fri, Mar 3, 2023 at 9:40 PM William Mitchell Jr <
>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>
>>>>>>>>>>> Here is the output of strace mmj2/mmj2jar/mmj2 compiled and run 
>>>>>>>>>>> under openjdk-17-jdk, Debian Sid, arm64, x11:
>>>>>>>>>>>
>>>>>>>>>>> https://pastebin.com/zcwgs2pc
>>>>>>>>>>>
>>>>>>>>>>> William
>>>>>>>>>>> On Friday, March 3, 2023 at 7:31:18 PM UTC-5 William Mitchell Jr 
>>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> After git clone https://github.com/digama0/mmj2,
>>>>>>>>>>>>
>>>>>>>>>>>> Success: compile with openjdk-11-jdk and runtime openjdk-11-jdk.
>>>>>>>>>>>> Every other combination of compiling/runtime I have available 
>>>>>>>>>>>> fails.
>>>>>>>>>>>>
>>>>>>>>>>>> Here is the error message from compiling and running under 
>>>>>>>>>>>> openjdk-17-jdk:
>>>>>>>>>>>>
>>>>>>>>>>>> Error: LinkageError occurred while loading main class 
>>>>>>>>>>>> mmj.util.BatchMMJ2
>>>>>>>>>>>>         java.lang.UnsupportedClassVersionError: 
>>>>>>>>>>>> mmj/util/BatchMMJ2 has been compiled by a more recent version of 
>>>>>>>>>>>> the Java 
>>>>>>>>>>>> Runtime (class file version 65.0), this version of the Java 
>>>>>>>>>>>> Runtime only 
>>>>>>>>>>>> recognizes class file versions up to 61.0
>>>>>>>>>>>>
>>>>>>>>>>>> William
>>>>>>>>>>>> On Friday, March 3, 2023 at 6:33:32 PM UTC-5 [email protected] 
>>>>>>>>>>>> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> By the way, if you are thinking about modernizing mmj2 there 
>>>>>>>>>>>>> are two known issues with newer versions of the JDK. One is the 
>>>>>>>>>>>>> missing 
>>>>>>>>>>>>> nashorn support as already mentioned, and the other is an issue 
>>>>>>>>>>>>> in the undo 
>>>>>>>>>>>>> system which causes ComposedEdits to not work correctly (the 
>>>>>>>>>>>>> required class 
>>>>>>>>>>>>> doesn't exist on JDK 10+). It is being version-checked now so you 
>>>>>>>>>>>>> shouldn't 
>>>>>>>>>>>>> get any build failures, but the user experience is that undo goes 
>>>>>>>>>>>>> one 
>>>>>>>>>>>>> character at a time which is pretty miserable. Maybe there is 
>>>>>>>>>>>>> something in 
>>>>>>>>>>>>> newer versions of the JDK for this but I couldn't find anything 
>>>>>>>>>>>>> useful in 
>>>>>>>>>>>>> JDK 10. That's why I recommend JDK 9 for most mmj2 users.
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Fri, Mar 3, 2023 at 6:26 PM David Crisp <
>>>>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Friday, 3 March 2023 at 22:41:54 UTC [email protected] 
>>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> openjdk-11-jdk works on my system.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Debian Sid
>>>>>>>>>>>>>> arm64
>>>>>>>>>>>>>> Java versions available to me: openjdk-8-jdk, openjdk-11-jdk, 
>>>>>>>>>>>>>> openjdk-17-jdk, openjdk-18-jdk, openjdk-19-jdk, openjdk-20-jdk, 
>>>>>>>>>>>>>> openjdk-21-jdk.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> openjdk-8-jdk: fails (error message posted below)
>>>>>>>>>>>>>> openjdk-11-jdk: success
>>>>>>>>>>>>>> openjdk-17-jdk: fails (error message posted below)
>>>>>>>>>>>>>> openjdk-18-jdk through openjdk-21-jdk: fails (all with the 
>>>>>>>>>>>>>> same error message posted below)
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>  The issue with JDK8 is what Mario suggests, and the issues 
>>>>>>>>>>>>>> with JDK18+ are what I'd expect from missing Nashorn support, 
>>>>>>>>>>>>>> but 17 is a 
>>>>>>>>>>>>>> weird one. I'd expect it to fail for the same reason as 18 
>>>>>>>>>>>>>> (Nashorn was 
>>>>>>>>>>>>>> removed in 14) but it looks like it's not even getting that far 
>>>>>>>>>>>>>> and is 
>>>>>>>>>>>>>> instead having trouble with loading the GUI libraries 
>>>>>>>>>>>>>> (libawt_xawt.so is 
>>>>>>>>>>>>>> the library that implements Java's low-level windowing 
>>>>>>>>>>>>>> functionality on top 
>>>>>>>>>>>>>> of X11).
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I suspect this is an issue with your install of 17, but I 
>>>>>>>>>>>>>> don't currently have an ARM system available to me so I can't 
>>>>>>>>>>>>>> test it 
>>>>>>>>>>>>>> myself with your exact setup - would you mind please trying to 
>>>>>>>>>>>>>> uninstall 
>>>>>>>>>>>>>> and reinstall 17 for me and seeing if you get the same 
>>>>>>>>>>>>>> stacktrace? If you 
>>>>>>>>>>>>>> do I'll add it to my list of things to investigate once I start 
>>>>>>>>>>>>>> diving into 
>>>>>>>>>>>>>> the code - 17 is the most recent LTS version, so it's one that 
>>>>>>>>>>>>>> we really 
>>>>>>>>>>>>>> want mmj2 to work with if at all possible.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Thanks
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Dave
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>
>>>>>>>>>>>>> You received this message because you are subscribed to the 
>>>>>>>>>>>>>> Google Groups "Metamath" group.
>>>>>>>>>>>>>> To unsubscribe from this group and stop receiving emails from 
>>>>>>>>>>>>>> it, send an email to [email protected].
>>>>>>>>>>>>>>
>>>>>>>>>>>>> To view this discussion on the web visit 
>>>>>>>>>>>>>> https://groups.google.com/d/msgid/metamath/ba2288fa-9f13-4d50-8334-cc6fc361e117n%40googlegroups.com
>>>>>>>>>>>>>>  
>>>>>>>>>>>>>> <https://groups.google.com/d/msgid/metamath/ba2288fa-9f13-4d50-8334-cc6fc361e117n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>>>>>>>>> .
>>>>>>>>>>>>>>
>>>>>>>>>>>>> -- 
>>>>>>>>>>> You received this message because you are subscribed to the 
>>>>>>>>>>> Google Groups "Metamath" group.
>>>>>>>>>>> To unsubscribe from this group and stop receiving emails from 
>>>>>>>>>>> it, send an email to [email protected].
>>>>>>>>>>>
>>>>>>>>>> To view this discussion on the web visit 
>>>>>>>>>>> https://groups.google.com/d/msgid/metamath/eefc22b1-5a98-4509-8bd9-bba24f410af2n%40googlegroups.com
>>>>>>>>>>>  
>>>>>>>>>>> <https://groups.google.com/d/msgid/metamath/eefc22b1-5a98-4509-8bd9-bba24f410af2n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>>>>>> .
>>>>>>>>>>>
>>>>>>>>>> -- 
>>>>>>>>> You received this message because you are subscribed to the Google 
>>>>>>>>> Groups "Metamath" group.
>>>>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>>>>> send an email to [email protected].
>>>>>>>>>
>>>>>>>> To view this discussion on the web visit 
>>>>>>>>> https://groups.google.com/d/msgid/metamath/b28d7f73-e42e-449c-a463-49d68af61160n%40googlegroups.com
>>>>>>>>>  
>>>>>>>>> <https://groups.google.com/d/msgid/metamath/b28d7f73-e42e-449c-a463-49d68af61160n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>>>> .
>>>>>>>>>
>>>>>>>> -- 
>>>>>>> You received this message because you are subscribed to the Google 
>>>>>>> Groups "Metamath" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>>> send an email to [email protected].
>>>>>>>
>>>>>> To view this discussion on the web visit 
>>>>>>> https://groups.google.com/d/msgid/metamath/3e337566-46c7-4c77-8baf-fb646238e8a9n%40googlegroups.com
>>>>>>>  
>>>>>>> <https://groups.google.com/d/msgid/metamath/3e337566-46c7-4c77-8baf-fb646238e8a9n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>> .
>>>>>>>
>>>>>> -- 
>>>>> You received this message because you are subscribed to the Google 
>>>>> Groups "Metamath" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>>> an email to [email protected].
>>>>>
>>>> To view this discussion on the web visit 
>>>>> https://groups.google.com/d/msgid/metamath/b30d4fdc-0f69-42fc-b99d-93ba02034a81n%40googlegroups.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/metamath/b30d4fdc-0f69-42fc-b99d-93ba02034a81n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Metamath" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected].
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/metamath/4ae64dff-2206-4dd4-b04b-e57284250843n%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/metamath/4ae64dff-2206-4dd4-b04b-e57284250843n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Metamath" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/metamath/8324bcf6-10d7-46f6-9f9a-65ffa244c6dan%40googlegroups.com.

Reply via email to