Controlling java version

I’d like to produce a java 1.6 compatible jar file from haxe code. Running on Ubuntu 21.04, with openjdk-8-jdk as my default javac. Here’s my compiler command line:

javac -version
javac 1.8.0_312

haxe -D java-ver=6 --java java Test.hx

However, the resulting class files seem to be java 1.8:

file Test.class
Test.class: compiled Java class data, version 52.0 (Java 1.8)

Setting java-ver to 5, 6 or 7 results in java 1.8 class files. Am I using “java-ver” correctly? Is there a way to get 1.6? The javac compiler includes a -target parameter that’s capable of producing what I want.