scripts/sql-dk.sh
branchv_0
changeset 253 d8442b266ca8
parent 199 88de2602deb3
     1.1 --- a/scripts/sql-dk.sh	Sat Jul 25 17:25:19 2020 +0200
     1.2 +++ b/scripts/sql-dk.sh	Sun Sep 13 12:01:35 2020 +0200
     1.3 @@ -18,6 +18,24 @@
     1.4  	"/usr/share/java/mysql.jar"
     1.5  );
     1.6  
     1.7 +# Standard libraries
     1.8 +[ -n "$STANDARD_LIB" ] || STANDARD_LIB=(
     1.9 +	"/usr/share/java/jaxb-api.jar"
    1.10 +	"/usr/share/java/jaxb-runtime.jar"
    1.11 +);
    1.12 +# JAXB library is needed since Java 9 (up to Java 8 it was part of the JRE).
    1.13 +# By default, we use JARs from the distribution.
    1.14 +# Some distributions might contain older versions of the JAXB library (2.3.0)
    1.15 +# that work but generate following waringns:
    1.16 +#   WARNING: An illegal reflective access operation has occurred
    1.17 +#   WARNING: Illegal reflective access by com.sun.xml.bind.v2.runtime.reflect.opt.Injector (file:/usr/share/java/jaxb-runtime.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int)
    1.18 +#   WARNING: Please consider reporting this to the maintainers of com.sun.xml.bind.v2.runtime.reflect.opt.Injector
    1.19 +#   WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
    1.20 +#   WARNING: All illegal access operations will be denied in a future release
    1.21 +# In order to get rid of them, the user can use newer JARs from Maven that are copied into the java/sql-dk/target/lib/ directory during build.
    1.22 +# This is done by adding them in the STANDARD_LIB variable in his environment.sh file.
    1.23 +
    1.24 +
    1.25  # Additional JDBC drivers might be specified in CUSTOM_JDBC array
    1.26  # Plugins (formatters etc.) might be specified in PLUGINS array
    1.27  
    1.28 @@ -26,7 +44,7 @@
    1.29  
    1.30  CLASS_PATH="$JAR";
    1.31  
    1.32 -for e in "${STANDARD_JDBC[@]}" "${CUSTOM_JDBC[@]}" "${PLUGINS[@]}"; do
    1.33 +for e in "${CUSTOM_JDBC[@]}" "${PLUGINS[@]}" "${STANDARD_JDBC[@]}" "${STANDARD_LIB[@]}"; do
    1.34  	CLASS_PATH="$CLASS_PATH:$e";
    1.35  done
    1.36