Im working on a Chat client that i didnt write the bulk of the code for. It works fine however when someone sends a message it beeps (system error beep) when using Java 7.
Java 6 and below doesn’t have this beep. I cant seem to find whats causing the beep is there any way to find it ?
I dont think its calling beep as i have
public class nobeep extends sun.awt.windows.WToolkit {
@Override
public void beep() {
System.out.println("tried to beep");
new Exception().printStackTrace();
}
}
and then called
System.setProperty("awt.toolkit", "nobeep");
in the main method.
Using the method to send a beep doesnt make it beep. Its only when sent normally. Is there a quick way to track down the cause of the beep ?
Edit:
After looking in the bugs database – its confirmed.
https://bugs.java.com/bugdatabase/view_bug?bug_id=7194469
I know it says no work around but is there one (java not c++) or just wait until update 8 ?
The solution I found was converting awt to swing. I cant find a way to over ride what the fix in the bug report was. Its now working fine in either version
Bug report
https://bugs.java.com/bugdatabase/view_bug?bug_id=7194469
fix
http://hg.openjdk.java.net/jdk8/awt/jdk/rev/b8a1ff892b33