1

I have a problem running a Java application through Eclipse. Upon clicking Run, a prompt shows:

"Assertion failed! Program:../truetype.c Line: 2133

Expression: glyph != NULL

(Please Retry to debug the application - JIT must be enabled)"

enter image description here * Upon clicking Retry, a prompt shows "javaw.exe has stopped working".

enter image description here

I tried to restart my laptop but the problem still occurs. Anyone knows how to solve it? Thanks in advance.

EDIT 1 : Below is the code I try to run.

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);
}
Managu
  • 8,849
  • 2
  • 30
  • 36
iamtheexp01
  • 3,446
  • 9
  • 35
  • 35
  • 2
    Which version of the JDK do you have installed? In none of the trees I've looked at is there a `src/share/native/sun/awt/font` directory, nor a `truetype.c` with a `glyph != NULL` assertion in/near line 2133. If it's a really old version, consider upgrading to the latest; the issue may already have been resolved there. – C. K. Young Jul 13 '12 at 04:04
  • Hello @ChrisJester-Young , you are right. The previous version I used is 1.3, I've tried using 1.6 and it's now working. Thanks! By the way, your comment is my accepted answer, how can I do that? – iamtheexp01 Jul 13 '12 at 05:52

1 Answers1

1

I thing your problem is not about "enable JIT", maybe with your java installation

Just-In-Time Debugging - see what JIT is first

How to: Enable/Disable Just-In-Time Debugging

Troubleshooting

  • check you java instation
    • try to run you java program from "command line": java NAME_OF_CLASS_WITH_MAIN
  • Check are eclipse instalation
    • try to run other java program from "eclipse"