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):
- Generate/get *.jar file.
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:
- Add preverified *.jar to build path: (Right click on project -> Libraries -> Add JARs)
- Export *.jar: (Right click on project -> Libraries ->Order and Export -> check your *.jar)
- Run application, it should work now
You can write ant script to automate this process
Cheers, M
精彩评论