开发者

why is this console program silent on Eclipse 3.5.2 and Ubuntu 10.10?

Why is this console program silent on Eclipse 3.5.2 and Ubuntu 1开发者_开发知识库0.10? Note that movies are audible given the current setup.

import java.awt.Toolkit;

public class JustBeep
{
    public static void main(String[] args)
    {
        System.out.println("This is a console program that should beep.");

        // try this
        System.out.print('\u0007'); 
            // this appears as a special character in the Eclipse console
            //  and is not what I want
        System.out.flush();

        // try something different
        Toolkit.getDefaultToolkit().beep();
    }
}


This bug report suggests it is an ubuntu 10.10 problem.

https://bugs.launchpad.net/ubuntu/+source/beep/+bug/677870

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜