Can't upgrade VASSAL on MacOS

Try running

JAVA=/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java ./VASSAL.sh

No go:

imacgc:~ greg$ JAVA=/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java ./VASSAL.sh

-bash: ./VASSAL.sh: No such file or directory

Do I need to move the Vassal directory and files into the same folder containing the Java components?

You need to be in the directory holding VASSAL.sh when you run that command.

Like this? The VASSAL.sh file is in the folder VASSAL-3.7.12:

imacgc:VASSAL-3.7.12 greg$ JAVA=/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java ./VASSAL.sh

Error: /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java is too old to run this version of Vassal. Please use Java 11 or later.

Would you verify that the path set for JAVA is correct?

What is the output of the following command?

ls  /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java

This is the pathway where the Java file can be found:

If I input that command while in the VASSAL-3.7.12 folder, I get this:

/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java
imacgc:VASSAL-3.7.12 greg$

The next thing we need to check is the output of the following command, run from the VASSAL-3.7.12 directory:

/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java -classpath lib/Vengine.jar VASSAL.launch.JavaVersionChecker

(btw, it’s a “path”, not a a “pathway”.)

OK, this is what I get:

imacgc:VASSAL-3.7.12 greg$ /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java -classpath lib/Vengine.jar VASSAL.launch.JavaVersionChecker

You have new mail in /var/mail/greg

That is not at all what I expected to see.

What is the output if you run

/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java --version

?

Here you go:

imacgc:VASSAL-3.7.12 greg$ /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java --version

openjdk 17.0.11 2024-04-16

OpenJDK Runtime Environment Temurin-17.0.11+9 (build 17.0.11+9)

OpenJDK 64-Bit Server VM Temurin-17.0.11+9 (build 17.0.11+9, mixed mode)

imacgc:VASSAL-3.7.12 greg$

That establishes that the Java you installed can run.

Please run

/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java -classpath lib/Vengine.jar VASSAL.launch.JavaVersionChecker && echo success

from the directory where you’ve installed Vassal. What is the output?

(BTW, you can put triple backticks ``` before and after terminal output in posts to make it easier to read.)

Here you go:

` imacgc:VASSAL-3.7.12 greg$ /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java -classpath lib/Vengine.jar VASSAL.launch.JavaVersionChecker && echo success

success

You have new mail in /var/mail/greg

imacgc:VASSAL-3.7.12 greg$ `

Have you looked into what this is? It’s happened both times that you’ve run the version checker.

Please run

/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java -Duser.dir=. -classpath lib/Vengine.jar VASSAL.launch.ModuleManager

from the directory where you’ve installed Vassal. Does Vassal start? If there is other output, what is it?

(The triple backticks need to be on their own line to work:

 '''
 stuff
 '''

)

Here you go. the /var file is a text edit file that makes no sense to me. Seems to report results of scans.

imacgc:VASSAL-3.7.12 greg$ /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java -Duser.dir=. -classpath lib/Vengine.jar VASSAL.launch.ModuleManager
Error: LinkageError occurred while loading main class VASSAL.launch.ModuleManager
	java.lang.ExceptionInInitializerError: null
You have mail in /var/mail/greg
imacgc:VASSAL-3.7.12 greg$ 

This could be important. May we see the contents?

There is a lot of content in it…sorry, I would rather not.

It’s a message spool file. What I’m interested in is the last message—the one which You have mail in /var/mail/greg indicates was added when you tried starting Vassal. You could ensure that the last message is this one by trying to run Vassal and immediately checking /var/mail/greg.

This is the obvious next step to continue troubleshooting with Java 17. Otherwise, you could install Java 11 and try the same steps with that.

I ran that command line again and this time it did not include any ref to the /var file:

imacgc:VASSAL-3.7.12 greg$ /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java -Duser.dir=. -classpath lib/Vengine.jar VASSAL.launch.ModuleManager
Error: LinkageError occurred while loading main class VASSAL.launch.ModuleManager
	java.lang.ExceptionInInitializerError: null
imacgc:VASSAL-3.7.12 greg$ 

I found the file and it had not been updated after I repeated the command. I looked into the file for the date on which the /var entry was generated, and on that date the reference was to a Norton Utilities Application Support file, which doesn’t even exist where it said it should. So, seems to me that the text edit file offers no guidance.

Alright. Next, try Java 11 instead, working through the same steps as above.

OK, I loaded temurins-11.jdk and ran the following command inside the Vassal-3.7.12 folder, with the ensuing reply:

imacgc:VASSAL-3.7.12 greg$ JAVA=/Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home/bin/java ./VASSAL.sh
Error: /Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home/bin/java is too old to run this version of Vassal. Please use Java 11 or later.
imacgc:VASSAL-3.7.12 greg$ 

For some reason, it is not recognising this pathway?