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




  • 相关阅读:
    python的logging库
    python的os库
    python的setup和teardown
    CF339D Xenia and Bit Operations线段树
    poj3311Hie with the Pie状压dp
    poj3254Corn Fields状压Dp
    CF414BMashmokh and ACMDP
    母函数6连杀
    母函数hdu1085
    UVA 1401Remember the WordDp
  • 原文地址:https://www.cnblogs.com/freemobile/p/783815.html
Copyright © 2011-2022 走看看