as you just found out java returns different default synthesizer when running the jar file outside of eclipse.

this might be caused by the javax.sound.midi.synthesizer property or a file in the classpath.

as a workaround you could print the property value when running the application inside of eclipse and set it manually so the jar file uses the same synthesizer.


if you want to use as default create the property


properties props = system.getproperties();
props.setproperty("javax.sound.midi.synthesizer", "");
synthesizer synth = midisystem.getsynthesizer();

more information:

Related Query

More Query from same tag