omar
omar

Reputation: 11

Does java have a built in library where they have an audio file already in their library?

can I import an API from java that plays a sound file that Oracle has in their API when a player wins a game; for example?

Upvotes: 1

Views: 818

Answers (1)

Andrew Thompson
Andrew Thompson

Reputation: 168845

Perhaps you are after the 'one liner'..

java.awt.Toolkit.getDefaultToolkit().beep();

Otherwise see either of the last two answers on the question linked by Nick Veys. The rest of the answers are low quality IMO.

Upvotes: 2

Related Questions