Problems getting device

There was no problem compiling my code but when I get the device by

AudioDevice ad = Pe.getAudioDevice();

the ad is null, how do I properly get my audio device object?

Thanks,

Andy

What’s “Pe” and why don’t you follow the convention (it should be lowercase)?

However, most likely your question is answered somewere in that programmer guide:
http://java.sun.com/j2se/1.4.2/docs/guide/sound/programmer_guide/contents.html