include a java-me jar with a blackberry application - blackberry

I want to use the ksoap2-j2me-core-prev-2.1.2.jar file. But on use time application create a error
Module 'ksoap2-j2me-core-prev-2.1.2' not found

Any 3rd party jar has to be preverified using the SDK's preverify tool. Also, make sure that in Eclipse, you select the check box for the jar underneath the "Order and Export" tab when setting the build path (the same place where you add the jar)

Related

AndroidAnnotations Eclipse configuration with ADT 23

Since ADT 23, there seems to have no way to add Annotation Processor Factory Path to projects:
No "Annotation Processing" item in Poject>Properties>Java Compiler.
Does anyone know how to add androidannotations-X.X.X-api.jar to the annnotaions processing in the last Eclipse ADT?
This is a known problem of the ADT bundle, and will be fixed as of ADT 23.0.3. In the meantime, you can fix this by downloading a standard Eclipse distribution and installing the ADT plugin to that. Or if you want to use your existing ADT bundle, you can install the necessary JDT plugin as described here.
Also please note that you do not have to add the androidannotations-X.X.X-api.jar as you written in the OP. You have to add the androidannotations-X.X.X.jar to the annotation processing factories and androidannotations-X.X.X-api.jar to your classpath (libs).
i am using ADT23 with Eclipse Luna.
Go to your project properties and select Java Compiler and select you Compiler Compliance Level to 1.6.
Then your Annotation Processing option will be enable.
Create a folder compile-libs in your project, where your lib folder and paste jar file androidannotations-3.0.1.jar this location compile-libs\androidannotations-3.0.1.jar .
Add androidannotations-api-3.0.1.jar in your project libs\androidannotations-api-3.0.1.jar .
Finally, you must add both file path in your Factory Path.
e.g {Your Project}/compile-libs/androidannotations-3.0.1.jar and
{Your Project}/libs/androidannotations-api-3.0.1.jar

Add a jar file to my Xamarin project

I am wanting to add the "universal-image-loader jar" file to my Xamarin project and am not sure what I need to do. I have had a look at this resource but would still like some help please: itexico.com/blog/bid/100447/Android-Wear-Developer-Preview-Using-Xamarin-Jar-Binding
Here is what I have done so far:
Downloaded https://github.com/nostra13/Android-Universal-Image-Loader
Created a folder called "Jars" in the root folder of my Xamarin project
I have added the "universal-image-loader-1.9.2-with-sources.jar" file to the "Jars" folder
I have set the build action to "embedded resource" for the "universal-image-loader-1.9.2-with-sources.jar" file
I have successfully build the project
I still cannot use the ImageLoaderobject in my application. I cannot resolve a ImageLoaderobject and am not sure what else I need to do.
May I please have some help?
Thanks in advance
I'd suggest you use Java Bindings Library for that.
What you need to do is to add a project to your solution of type "Android Java Bindings Library" you DON'T need to create Jars folder it is created in the new project by itself. Add your jars there. On your startup project click on references and add the java binding project you have just created as a reference. build it and try accessing your assembly either by adding it in the using section or by it's fully qualified name.
Good luck!

export external jar in blackberry but does'nt work

I generated a jar that contain the class which I use in my application, but I add this jar into the project following these steps:
right click in the project.
properties
Build
Libraries
Add external jars or add jars
ok
I can use these libraries as I write my code, but when I'm loading my project in the emulator or device it said that my library "NOT FOUND".
Please help, what is the correct way to use an external jar in blackberry projects?
please try following step:
right click in the project.
properties
Build
Libraries
Add external jars
select order and export tab
check mark true which .jar file you add
click ok
From the BlackBerry developer docs:
In the Package Explorer view, right-click the project that you want to add a dependency to.
Click Build Path > Configure Build Path .
Click the Libraries tab.
Complete one of the following tasks:
Click Add JARS if the .jar file is in the current workspace.
Click Add External JARS if the .jar file is not in the current workspace.
Select the .jar file that you want this project to depend on. The .jar file must be generated by a Java® application project. You cannot add a BlackBerry® application project of the Library type in this manner.
Click OK.
Pay close attention to the two different options in step 4. above, choosing the one that applies to your situation (where your .jar file is located).

Third Party API in Blackberry(JDE)

How to use third party api in blackberry jde ?....(I need send file to ftp server)
You can simply add the JAR file into the project - on the projects name, right click and select "Add file to project". With it added, you can import any of its libraries.
Another way is to make another project and set it to the library type. Add the JAR to it and and then you can add this project to your main project as a project dependancy. This works also but if you want to put your project on a real device, you need to first install the library project and then install your app.

where to find "package com.rim.samples.docs.notifications;"

i a developing blackberry aplication using eclipse can any one tell where to find the following library
package com.rim.samples.docs.notifications;
i have downloaded it from blackberry site but i dont know how to use it
com.rim.samples.docs namespace is common for samples BlackBerry Application Developer Guide.
On the other hand, "package" token defines the packege namespace, not the import.
If you have downloaded code and post it to namespace with other name, you may have trouble to compile it. Resolve it in two ways:
1. if your code file is placed directly in project src folder, simply remove
package com.rim.samples.docs.notifications;
from code, this will set namespace to default.
2. in project src folder create folder "com\rim\samples\docs\notifications" and move file to folder "notifications".

Resources