Now SoundPlayer class supports only .ogg files instead of wav file which can reduce the final .jar file size drastically. It uses library.