Java:如何启用JIT?

时间:2012-07-13 03:22:25

标签: java windows eclipse jit

我在通过Eclipse运行Java应用程序时遇到问题。单击“运行”后,会出现一个提示:

“断言失败了! 计划:../ truetype.c 行:2133

表达式:字形!= NULL

(请重试调试应用程序 - 必须启用JIT)“

enter image description here *单击“重试”后,会出现“javaw.exe已停止工作”的提示。

enter image description here

我尝试重新启动笔记本电脑,但问题仍然存在。谁知道怎么解决?提前致谢。

编辑1: 下面是我尝试运行的代码。

public static void main(String[] args) {
    initView();
}

private static void initView() {
    final JFrame frame = new JFrame();
    frame.setTitle("Testing 101");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    final JTextField nameTextField = new JTextField();
    frame.getContentPane().add(nameTextField);

    JButton saveButton = new JButton();
    saveButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            JOptionPane.showMessageDialog(frame, "Hello "+nameTextField.getText());
        }
    });
    frame.getContentPane().add(saveButton);

    // Display.
    frame.pack();
    frame.setVisible(true);
}

1 个答案:

答案 0 :(得分:1)

我认为你的问题不是关于“启用JIT”,可能是你的java安装

即时调试 - 看看JIT是第一个

如何:启用/禁用实时调试

故障排除

  • 检查你的java instation
    • 尝试从“命令行”运行java程序:java NAME_OF_CLASS_WITH_MAIN
  • 检查是日食安装
    • 尝试从“eclipse”
    • 运行其他java程序