mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
Updates the build script for conditional compilation using either Java 8 or Java 9 options. Java 9 deprecated the java.xml.bind package and removed it as a default Java SE package, so we have to reference it via the --add-modules argument. Updates the linux/mac launch script to check the java runtime version and use either a Java 8 or Java 9 launch command.
17 lines
516 B
Bash
Executable File
17 lines
516 B
Bash
Executable File
#!/bin/bash
|
|
|
|
java -version
|
|
|
|
# Test for java version 9
|
|
JAVA_9=$(java -version 2>&1 | grep -i version | sed 's/.* "\([9]\).*/\1/')
|
|
|
|
if [ -z ${JAVA_9+x} ]; then
|
|
echo Using Java 9 program options
|
|
# Java 9 uses the G1 garbage collector by default and requires that we specify the
|
|
# java.xml.bind package since it's been removed from the java se core library
|
|
java -cp "*:libs/*" --add-modules java.xml.bind gui.SDRTrunk;
|
|
else
|
|
echo Using Java 8 program options
|
|
java -XX:+UseG1GC -cp "*:libs/*" gui.SDRTrunk;
|
|
fi
|