BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 06-24-2010, 10:19 AM   #1
playplay1978
New Member
 
Join Date: Jun 2010
Model: 9000
PIN: N/A
Carrier: SingTel
Posts: 2
Default Using external library jar file in a project issue... i'm really struggling... please

Please Login to Remove!

Hi.



I understand that this issue has been discussed before and i've read posts about it but none of them can actually solve my issue. I'm really struggling and i have spent more than 2 days to no avail.



I'm using JDE 4.70.

I'm creating a library project which has a few classes in it and can be imported into app project. Firstly, the project works in both simulator and phone when i include all the source files and build them.



However, what i want is a library which can be imported into other app project.



Then, i took out those relevant java files and put them into a new Library project in a new workspace. So, i compiled it into jar, preverified it with

preverify -classpath "C:\Program Files\Research In Motion\BlackBerry JDE 4.7.0\lib\net_rim_api.jar" "your_jar_filename" and got it from bin\output

Firstly, i did this without deleting cso, cod and csl from the jar files. This followed by copying the jar file into "lib" folder of a new project

i) just add the jar file into a new app project (although by default, there's no selection of "jar" in the dialog box). I built it successfully. I tried to run the project in both simulator and phone. Nothing happens. It seems like the app is hidden or what.

ii) I tried "Properties->Build->Imported Jar Files". I built it successfully but same thing happened like in i) where it seems like the app is hidden or what.

iii) So, i tried to create 2 projects in same workspace where 1 project is the app project and the other one is a library project with the jar file. I also set the project dependencies of the app project to the library project. I built it successfully but when i tried to run in simulator, it gave me

"Exception java.lang.ClassCastException"



Secondly, i repeated the compilation and preverification but this time i removed cso, cod and csl from the jar file. Then, i tried i), ii) and iii). I could not build for all these 3. It kept giving me errors, i.e.

"Cannot Find Symbol"...



Other than that, i also have tried setting the project to be of CLDC App type and then, got the jar file and repeated i), ii) and iii). All gave me some sort of error or did not work supposedly.



I really don't know what else i can try... i'm really flattened now...



Thank you sooo much...



PLEASSSSSSSSSEEEE HELP!!!
Offline  
Old 06-24-2010, 06:56 PM   #2
playplay1978
New Member
 
Join Date: Jun 2010
Model: 9000
PIN: N/A
Carrier: SingTel
Posts: 2
Default

Anyone, please?

Please help...
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


OEM iPhone 11 PRO X/XR XS MAX 8/7 PLUS Fast Charging USB Cable 10 Feet & 6 Feet  picture

OEM iPhone 11 PRO X/XR XS MAX 8/7 PLUS Fast Charging USB Cable 10 Feet & 6 Feet

$2.99



iPhone 13 12 11 PRO MAX XR XS 8/7/6 Fast Charger USB Data Cable cord 10 feet/3M picture

iPhone 13 12 11 PRO MAX XR XS 8/7/6 Fast Charger USB Data Cable cord 10 feet/3M

$4.99



New Apple White Charger Cradle Docking Station Base Stand A1381 OEM picture

New Apple White Charger Cradle Docking Station Base Stand A1381 OEM

$8.50



10 Feet/3M For iPhone 13 12 11 PRO MAX MINI  X XR XS 8 7 Fast Charging USB Cable picture

10 Feet/3M For iPhone 13 12 11 PRO MAX MINI X XR XS 8 7 Fast Charging USB Cable

$5.00



Lot of OEM APPLE iPAD LCD And White Front Glass Replacement 6091l-1402C picture

Lot of OEM APPLE iPAD LCD And White Front Glass Replacement 6091l-1402C

$17.99



Genuine 99.5Wh OEM A1618 Battery for Apple MacBook Pro 15” Retina A1398 Mid 2015 picture

Genuine 99.5Wh OEM A1618 Battery for Apple MacBook Pro 15” Retina A1398 Mid 2015

$45.80







Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.