找不到黑莓的包装

时间:2011-12-23 08:30:26

标签: blackberry java-me j2mepolish

我收到以下类型的错误,任何人都可以帮忙解决这个问题。我使用过Eclipse 3.2.2和Blackberry-5.0.0 jar,编译器合规级别1.4,jdk 1.5和j2mepolish-2.1.4.jar

C:\Documents and Settings\Administrator\workspace1\TTMFBlackBerry\src\ChangeOfDividendPoster.java:12: package net.rim.device.api.io.transport does not exist
    [javac] import net.rim.device.api.io.transport.ConnectionDescriptor;
    [javac]                                        ^
    [javac] C:\Documents and Settings\Administrator\workspace1\TTMFBlackBerry\src\ChangeOfDividendPoster.java:13: package net.rim.device.api.io.transport does not exist
    [javac] import net.rim.device.api.io.transport.ConnectionFactory;
    [javac]                                        ^
    [javac] C:\Documents and Settings\Administrator\workspace1\TTMFBlackBerry\src\ChangeOfDividendPoster.java:101: cannot find symbol
    [javac] symbol  : class ConnectionFactory
    [javac] location: class ChangeOfDividendPoster
    [javac]          ConnectionFactory connFact = new ConnectionFactory();
    [javac]                  ^
    [javac] C:\Documents and Settings\Administrator\workspace1\TTMFBlackBerry\src\ChangeOfDividendPoster.java:101: cannot find symbol
    [javac] symbol  : class ConnectionFactory
    [javac] location: class ChangeOfDividendPoster
    [javac]          ConnectionFactory connFact = new ConnectionFactory();
    [javac]                                                   ^
    [javac] C:\Documents and Settings\Administrator\workspace1\TTMFBlackBerry\src\ChangeOfDividendPoster.java:102: cannot find symbol
    [javac] symbol  : class ConnectionDescriptor
    [javac] location: class ChangeOfDividendPoster
    [javac]          ConnectionDescriptor connDesc;
    [javac]          ^
    [javac] 5 errors
[javac] If an API-class was not found, you might need to define where to find the device-APIs. Following classpath has been used: [C:\Program Files\J2ME-Polish2.2.1\import\mmapi.jar;C:\Program Files\J2ME-Polish2.2.1\import\cldc-1.1.jar;C:\Program Files\J2ME-Polish2.2.1\import\midp-2.0.jar;C:/Program Files/J2ME-Polish2.2.1/import/nokia-ui.jar;C:/Program Files/J2ME-Polish2.2.1/import/pdaapi.jar;C:/Program Files/J2ME-Polish2.2.1/import/btapi.jar;C:/Program Files/J2ME-Polish2.2.1/import/wmapi-2.0.jar;C:/Program Files/J2ME-Polish2.2.1/import/wmapi.jar;C:/Program Files/J2ME-Polish2.2.1/import/m3g.jar;C:/Program Files/J2ME-Polish2.2.1/import/jsr172.jar;C:/Program Files/J2ME-Polish2.2.1/import/jsr234.jar].

1 个答案:

答案 0 :(得分:0)

看起来编译器无法找到RIM的BlackBerry API,请确保您的项目在Build Path的库(net_rim_api.jar)中具有JRE系统库[BlackBerry JRE x.0.0]。在“使用了classpath”之后,它未在输出中列出。找到它的路径应该类似于 BLACKBERRY ECLIPSE ROOT \ plugins \ net.rim.ejde.componentpack VERSION \ components \ lib。