Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
Srikant
Posts: 3
Registered: ‎06-24-2009
My Device: Not Specified
Accepted Solution

How to add External jar File?

Hi All,
1. Working on BB storm (9530/9500 simulator) version is v4.7.0.75
2. Used BB JDE v4.7

4. Request is as follows:

 My application needs  commans-httpclient.ja.

if i add the external jar file.

application will throw run time error like

module 'commons-httpclient 'not found.

 

My request is here:

is it posible to add external jar file in blackberry?

if yes ,How to add External jar File?

 

can any body help me on this,as i am doing  this for first time

 

Thanks in Advance

-Srikant Bureddy
Please use plain text.
Developer
BBDeveloper
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: How to add External jar File?

Check this KB article.

 

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800901/How_To_-_Compi...


Use Search. "Accept Solution" If the problem is resolved.
Please use plain text.
Developer
mantaker
Posts: 1,477
Registered: ‎12-30-2008
My Device: Torch 9810

Re: How to add External jar File?

commons http client is not designed for mobile devices - rather it is done on J2SE and those classes are not supported here.. You might consider taking up the tedious job of porting it to j2me .. :smileywink:

 

Cheers.. 

--
Manimaran Selvan
Co-Founder, Tech Lead,
Equity Markets Research Group
Please use plain text.
Developer
amardeepjaiman
Posts: 293
Registered: ‎02-25-2009
My Device: Not Specified

Re: How to add External jar File?

The way to add external jars in project using JDE, is in project properties.

 

But the jar is in J2SE, it might not run on BB cause it might be using J2SE APIS which are resticted in mobile.

Please use plain text.
New Developer
Srikant
Posts: 3
Registered: ‎06-24-2009
My Device: Not Specified

Re: How to add External jar File?

Hi,

 

Working on BB storm (9530/9500 simulator)

version is v4.7.0.75 2. Used BB JDE v4.7 4.

Request is as follows: My application needs commans-httpclient.jar.

 

As per the instraction mentioned by the link i created and tried to build application by adding commons-httpclient.jar

given Error while building project.

 

 

below is the error code .......

 

 

Building HttpClient
C:\Program Files\Research In Motion\BlackBerry JDE 4.7.0\bin\rapc.exe  -quiet  import=..\lib\net_rim_api.jar library=HttpClient HttpClient.rapc warnkey=0x52424200;0x52525400;0x52435200 "C:\Program Files\Research In Motion\BlackBerry JDE 4.7.0\MDS\classpath\commons-httpclient.jar"
java.io.FilterInputStream: Warning!: No definition found
java.io.Serializable: Warning!: No definition found
org.apache.commons.httpclient.NameValuePair: Warning!: Implements undefined interface: java.io.Serializable
org.apache.commons.httpclient.Cookie: Warning!: Implements undefined interface: java.io.Serializable
java.util.Comparator: Warning!: No definition found
org.apache.commons.httpclient.Cookie: Warning!: Implements undefined interface: java.util.Comparator
java.util.List: Warning!: No definition found
java.lang.Cloneable: Warning!: No definition found
org.apache.commons.httpclient.HostConfiguration: Warning!: Implements undefined interface: java.lang.Cloneable
java.net.InetAddress: Warning!: No definition found
java.net.Socket: Warning!: No definition found
org.apache.commons.httpclient.HttpHost: Warning!: Implements undefined interface: java.lang.Cloneable
java.util.Set: Warning!: No definition found
java.util.ArrayList: Warning!: No definition found
java.util.HashMap: Warning!: No definition found
org.apache.commons.httpclient.URI: Warning!: Implements undefined interface: java.lang.Cloneable
java.lang.Comparable: Warning!: No definition found
org.apache.commons.httpclient.URI: Warning!: Implements undefined interface: java.lang.Comparable
org.apache.commons.httpclient.URI: Warning!: Implements undefined interface: java.io.Serializable
java.util.BitSet: Warning!: No definition found
org.apache.commons.httpclient.HttpVersion: Warning!: Implements undefined interface: java.lang.Comparable
java.lang.ref.ReferenceQueue: Warning!: No definition found
java.util.Map: Warning!: No definition found
java.util.WeakHashMap: Warning!: No definition found
java.util.LinkedList: Warning!: No definition found
java.io.FilterOutputStream: Warning!: No definition found
org.apache.commons.httpclient.cookie.CookiePathComparator: Warning!: Implements undefined interface: java.util.Comparator
java.util.Collection: Warning!: No definition found
java.io.File: Warning!: No definition found
org.apache.commons.httpclient.params.DefaultHttpParams: Warning!: Implements undefined interface: java.io.Serializable
org.apache.commons.httpclient.params.DefaultHttpParams: Warning!: Implements undefined interface: java.lang.Cloneable
java.lang.reflect.Constructor: Warning!: No definition found
java.lang.reflect.Method: Warning!: No definition found
java.net.HttpURLConnection: Warning!: No definition found
java.net.URL: Warning!: No definition found
org.apache.commons.logging.Log: Warning!: No definition found
org.apache.commons.httpclient.AutoCloseInputStream: Warning!: Reference to undefined class: java.io.FilterInputStream
org.apache.commons.httpclient.AutoCloseInputStream: Error!: Missing stack map at label: 24
Error while building project

 

 

Please use plain text.
Developer
BBDeveloper
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: How to add External jar File?

Th JAR file which trying has class files which are not getting recognised by BB Jvm.

Use Search. "Accept Solution" If the problem is resolved.
Please use plain text.
Developer
mantaker
Posts: 1,477
Registered: ‎12-30-2008
My Device: Torch 9810

Re: How to add External jar File?

These J2SE classes/interfaces has not been implemented by RIM.. Check with the API documents for the available classes/interfaces..

 

Cheers.. 

--
Manimaran Selvan
Co-Founder, Tech Lead,
Equity Markets Research Group
Please use plain text.