I am getting the following type of error, can anyone help on this .I have used Eclipse 3.2.2 and Blackberry-5.0.0 jar,compiler compliance level 1.4,jdk 1.5 and 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].
有帮助吗?

解决方案

Looks like the compiler cannot find RIM's BlackBerry APIs, make sure your project has JRE System Library [BlackBerry JRE x.0.0] in the Libraries of the Build Path (net_rim_api.jar). It's not listed in your output after "Following classpath has been used". The path where this is found should be something like BLACKBERRY ECLIPSE ROOT\plugins\net.rim.ejde.componentpackVERSION\components\lib.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top