As far as I can tell, the ability to synthesize audio into files from MIDI was lost during the great Java modularization due to the failure to export the AudioSynthesizer interface.
Is there some reason this has not been fixed? See JDK-8170518 <https://bugs.openjdk.java.net/browse/JDK-8170518>, which I filed in 2016. Alan