vdjtools
vdjtools copied to clipboard
fixed bash wrapper error with Java version (as in MIXCR & mitools)
There's not much description on the actual issue but looking at the PR, this also fixes my issue which is that the shell script is incompatible with latest java 17 version (because version number for Java 8 was "1.8...." while for Java 17 is "17..."). Here's showing the issue:
$ /package/java/17.0.1/bin/java -version
java version "17.0.1" 2021-10-19 LTS
Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing)
$ /package/java/8u311/bin/java -version
java version "1.8.0_311"
Java(TM) SE Runtime Environment (build 1.8.0_311-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.311-b11, mixed mode)
Using the existing version parser, one gets:
$ /package/java/8u311/bin/java -version 2>&1 | grep version | awk '{ print $3 }' | sed "s/.*1\.\(.*\)\..*/\1/"
8
$ /package/java/17.0.1/bin/java -version 2>&1 | grep version | awk '{ print $3 }' | sed "s/.*1\.\(.*\)\..*/\1/"
"17.0.1"
This incorrect version parsing then prevents the shell script from starting vdjtools with the following bash error:
/package/vdjtools/1.2.1/vdjtools: line 7: [[: "17.0.1": syntax error: operand expected (error token is ""17.0.1"")
Unrecognized VM option 'AggressiveOpts'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.