开发者

Blackberry extrenal library problem (module not found)

I am using eclipse. When I add an external jar (import it.sauronsoftware.ftp4j.*;) it seems to be ok, I reference the external jar by right clicking project and the properties. When I instantiate an FTPclient opbject and run in the simulator I get "module not found".

Somebody on a different forum suggested creating a new library and adding the jar to it, then reference this library as a dependency in my main bb project. The downside to this is that I the librar开发者_开发知识库y must be installed along with the compiled bb app and I dont want this. Is there another way to import third party libs into eclipse with blackberry plugin that will make this work?

thanks


my solution is (for eclipse plugin):

  1. Generate/get *.jar file.
  2. Preverify *.jar file using preverify tool (it's in JDE_DIR\components\bin):

    preverify -classpath {jde.home}\lib\net_rim_api.jar {output.file} -d {output.dir}

above command will produce preverified *.jar in: {output.dir}\output\

in eclipse:

  1. Add preverified *.jar to build path: (Right click on project -> Libraries -> Add JARs)
  2. Export *.jar: (Right click on project -> Libraries ->Order and Export -> check your *.jar)
  3. Run application, it should work now

You can write ant script to automate this process

Cheers, M

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜