49b import javax.sound.midi.*; import java.io.*; public class SbTest { public static void main(String args[]) throws Exception { Synthesizer synthesizer = null; Soundbank sb; Instrument instruments[]; /* try { if ((synthesizer = MidiSystem.getSynthesizer()) == null) { System.out.println("getSynthesizer() failed!"); System.exit(1); } synthesizer.open(); } catch (Exception ex) { ex.printStackTrace(); System.exit(1); } if ((sb = synthesizer.getDefaultSoundbank()) == null) { System.out.println("Couldn't get default sound bank"); System.exit(1); } */ File sbFile = new File("/usr/local/jdk1.3.1/jre/lib/audio/soundbank.gm"); sb = MidiSystem.getSoundbank(sbFile); /* The following returns an empty array with JDK 1.3.1 in FreeBSD */ instruments = sb.getInstruments(); if (instruments.length == 0) { System.out.println("Empty instruments[] array"); System.exit(1); } System.exit(0); } } . 0