zoukankan      html  css  js  c++  java
  • J2ME的学习--编译出错

    配置都做完了,做了一个简单的hello world,可编译总是出以下的错
    Running with storage root DefaultGrayPhone
    Running with locale: Chinese_People's Republic of China.936
    Running in the identified_third_party security domain
    java.lang.SecurityException: Application not authorized to access the restricted API
        at com.sun.midp.security.SecurityToken.checkIfPermissionAllowed(+40)
        at com.sun.midp.security.SecurityToken.checkIfPermissionAllowed(+7)
        at com.sun.midp.midletsuite.MIDletSuiteImpl.checkIfPermissionAllowed(+8)
        at com.sun.midp.midletsuite.Installer.getInstaller(+18)
        at com.sun.midp.dev.GraphicalInstaller.<init>(+367)
        at com.sun.midp.dev.GraphicalInstaller.<init>(+6)
        at java.lang.Class.runCustomCode(+0)
        at com.sun.midp.midlet.MIDletState.createMIDlet(+34)
        at com.sun.midp.midlet.Scheduler.schedule(+52)
        at com.sun.midp.main.Main.runLocalClass(+28)
        at com.sun.midp.main.Main.main(+80)
    Execution completed.
    3389758 bytecodes executed
    24 thread switches
    1666 classes in the system (including system classes)
    17593 dynamic objects allocated (522376 bytes)
    1 garbage collections (0 bytes collected)

    后来发现是wirless toolkit Emulator的设置问题


    图中Midlet的地方,要么空着,要么填程序名称。

    将WTK目录下的audiodemo源代码复制到工程所在目录下,运行正常,如下:




  • 相关阅读:
    git 实践(二) push的使用
    git 实践(一) pull的使用
    redux项目实战应用笔录
    浅谈ES6的Object.assign()浅拷贝
    React下reducer中处理数组&&对象的赋值改动
    git pull与git clone
    (0)网络编程基础(网络基本知识)
    (1)什么是socket(套接字)
    (12)异常处理
    (11)类的内置函数
  • 原文地址:https://www.cnblogs.com/freemobile/p/783815.html
Copyright © 2011-2022 走看看