views:

111

answers:

1

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 library 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

A: 

Hi

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

sherluss