3.6.14 and Java 11

I run java -version and see 11.0.18.
I kick off 3.6.14 Vassal.sh and I get an error message that says my Java is too old and I need to run Java 11 or later :-).

Already updated my Java just to be sure, still see this. Any hints on next steps?

Running Linux - Ubuntu 20,4.6…

Let’s work through the startup script one step at a time to find the problem.

From the directory where you’ve installed Vassal, run the following command:

java lib/Vengine.jar VASSAL.launch.JavaVersionChecker

What is the output?

java lib/Vengine.jar VASSAL.launch.JavaVersionChecker

Error: Could not find or load main class lib.Vengine.jar
Caused by: java.lang.ClassNotFoundException: lib.Vengine.jar

BTW, if I do the same thing in the 3.6.7 VASSAL dir on my machine, I get the same error. But if I run Vassal.sh, it runs fine with that version of Vassal…

I’m sorry, I left out part of the command line you were supposed to run. It should be:

java -classpath lib/Vengine.jar VASSAL.launch.JavaVersionChecker

What’s the output from running that?

nothing. I run it and it produces no output, just goes back to the command prompt
same in both directories … .14 and .7

Ok. Please run these two commands from the directory where you’ve installed Vassal:

java -classpath lib/Vengine.jar VASSAL.launch.JavaVersionChecker
echo $?

The second command will print the exit code from the first command. What’s the output of this?

Hiya - I’ll try this when I get back to that PC.

BTW, I did load .14 on my other linux PC (mint 21.1 vera) - works fine

I run those commands in my directory where I installed .14.
The first one runs without any output.
The second one reports back an exit code of 0.

same with .15 as well. I just DL’ed that one to check - it behaves the same.

Ok. The result you got is the expected result for Java 11. Java ran the version checker program and exited with return code 0, which means success, i.e., it is new enough to read a class file compiled for Java 11.

There’s a line in VASSAL.sh near the top which is:

set -e

Change that line to be

set -ex

and then run VASSAL.sh. There should be some additional output now. Please paste that here.

++ which java

  • JAVA=/usr/bin/java
  • ‘[’ ‘!’ -x /usr/bin/java ‘]’
    ++ realpath ./VASSAL.sh
  • EXEC_PATH=‘/home/fred/My Stuff/VASSAL/VASSAL-3.6.14/VASSAL.sh’
    ++ dirname /home/fred/My Stuff/VASSAL/VASSAL-3.6.14/VASSAL.sh
  • INSTALL_DIR=‘/home/fred
  • /usr/bin/java -classpath ‘/home/fred
    Stuff/VASSAL/VASSAL-3.6.14/lib/Vengine.jar’ VASSAL.launch.JavaVersionChecker
  • echo ‘Error: /usr/bin/java is too old to run this version of Vassal. Please use Java 11 or later.’
    Error: /usr/bin/java is too old to run this version of Vassal. Please use Java 11 or later.
  • exit 1

looks like it doesn’t like my directory name with a " " in it → My Stuff…
if i change name of dir, it works…elim the whitespace…

Try the following edit:

Change these lines

EXEC_PATH=$(realpath "$0")


EXEC_PATH="$(realpath "$0")"
INSTALL_DIR="$(dirname ${EXEC_PATH})"

Does it work for you now?

nope - but if I take out the whitespace in the directory name, it does.

Try this:

EXEC_PATH=$(realpath "$0")
INSTALL_DIR=$(dirname "${EXEC_PATH}")

yep - that works with the original directory name…thx for tracking this down with me.

It was a mistake for the designers of filesystems to have ever permitted spaces in paths…

Anyway, we’ll get the fix into the next release, which will probably be 3.7.0-beta2.

it doesn’t see all the modules I had in .7, but it does start up. Not all the modules are preserved.

ok thx - appreciate the help!