• 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源代码复制到工程所在目录下,运行正常,如下:




  • 相关阅读:
    Oracle And子句
    Oracle Where(条件)子句用法
    extern “C”的作用详解
    函数重载
    给变量起名字的网站。
    同步异步
    CCS5.5安装破解过程
    Semaphore_pend();阻塞函数
    vi常用命令
    Linux下VI操作命令
  • 原文地址:https://www.cnblogs.com/freemobile/p/783815.html
Copyright © 2020-2023  润新知