I would use Java and exec an external program:
Runtime.getRuntime().exec("beep.exe"); //not sure Beep.exe is a real thing
Which program to exec? Not sure, but look here for inspiration:
https://superuser.com/questions/227939/how-to-make-the-pc-speaker-beep-from-the-windows-7-command-prompt
or write your own:
http://www.frank-buss.de/beep/
Note that using exec is inherently platform-specific and thus frowned upon in Java. However, what you are trying to do is platform specific, so this is your best option.
Other things worth trying/thinking about:
java.awt.Toolkit.getDefaultToolkit().beep();
But I think that beeps on the soundcard.
And
System.out.print( (char)7 );
but I'm not sure that will always work.