为什么我们越来越" JVM错误104 QUOT;错误? [英] why we are getting "JVM error 104" error?

查看:94
本文介绍了为什么我们越来越" JVM错误104 QUOT;错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到JVM错误104错误消息,当我尝试运行我的黑莓应用程序。

I am getting "JVM error 104" error message, when I try to run my Blackberry application.

如果我添加以下语句,我得到的问题。所有的类都是 MainScreen

If I add the following statements, I am getting the issue. All classes are MainScreen.

1.) Ui.getUiEngine().pushScreen(new SubCardSelection());

2.) Dialog.alert("Welcome");

我的问题是;为什么我收到此错误信息?

My question is; Why I am getting this error message ?

先谢谢了。

推荐答案

这可能是因为:


  • 您忘记设置正确的样式( ButtonField.CONSUME_CLICK ),如<一个href=\"http://supportforums.blackberry.com/t5/Java-Development/Dialog-Inform-throws-error-when-used-from-within-change-listener/m-p/607000\"相对=nofollow>此线程

  • you forget to set the right style (ButtonField.CONSUME_CLICK) as in this thread

ButtonField searchButton = new ButtonField( "Search" , ButtonField.CONSUME_CLICK | ButtonField.FIELD_HCENTER );
searchButton.setChangeListener( new FieldChangeListener(){
    public void fieldChanged( Field field , int context){
        Dialog.alert( "Pressed Search" );
    }
});


  • 或只是因为你不消耗在正确的地方发生的事件(如的这里)解释说:

    • or just because you don't consume the events in the right place (as explained here):
    • 您添加一些字段到屏幕在构造函数(正确的),然后试图从在同一构造函数中的字段检索值(不正确)。结果
        字段将直到退出构造函数和允许的框架,在屏幕甚至不会显示给用户。

      You are adding some fields to the screen in the constructor (correct), then attempting to retrieve the values from the fields in the same constructor (incorrect).
      The fields will not even be displayed to the user until you exit the constructor and allow the framework to display the screen.

      任何方式与运行时未捕获的异常,这就是所谓的 JVM错误104 的意思。

      Any way, that ends with a runtime uncaught exception, which is what "JVM error 104" means.

      这篇关于为什么我们越来越&QUOT; JVM错误104 QUOT;错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆