BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 03-02-2009, 05:22 PM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: May 2008
Model: 8700
PIN: N/A
Carrier: Telcel
Posts: 69
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Transition from standar J2ME to BB API

Please Login to Remove!

Lately, it was decided that the end device of a application I have been developing on J2ME for over a year was going to be a BlackBerry. Most directly, blackberry 8300 so i was asked to use the blackberry API and do the transition of the code to use it. I tested my application with J2ME on a BB and worked withouth a hassle, still, either I do what the boss said or I get fired so i started adding the libraries and do what i has to be changed.

Once the compilation showed no more error (5 straight dyas of work. not that many examples and tips to use) it showed me that my once 118kb program jumped over to 5mb!!!!!!!

How can this be possible, fearing that this was bound to happen, i kept my import to the minimun, only importing what I was really using on each java source code. But still, it happened.

Any idea of a way to make my code smaller??

By the way, i'm working on the Java ME Platform SDK 3.0 early access. Bouth Eclipse and NetBeans had proven to be a mayor hassle to import my already wirtten code, specially the webservices part (i'm using KSOAP2, easy to implement and it handles .NET web services pretty nice.) and the plugin gave me a lot of problems while BB JDE always give me some kind of error when preverifying BB API code for some reason.
Offline  
Old 03-03-2009, 05:25 AM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2007
Location: Ernakulam, Kerala, India
Model: 8320
Carrier: Airtel
Posts: 65
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Cj
Actually you don't need to worry about the size, Have you tried the installation ? If so you might come to know that it's the same size.

Also I have a suspect about the attachments/jars/images that you use,
Please check them.
__________________
Regards
Anand.
Offline  
Old 03-03-2009, 10:25 AM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: May 2008
Model: 8700
PIN: N/A
Carrier: Telcel
Posts: 69
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yah, i was checking the deploy of the whole library, besides there to be a lot of classes compiled, there are quite a few images the BB API uses, and seems to be included in the elements i'm using for my forms, cuz, as i stated in my previous post, i only added what i was gonna use on the source.

But still, its kinda big.

Also, i need to bring it to smaller size, cuz this will be a program that i'll need to be download by several of my company co-workers.
Offline  
Old 03-03-2009, 10:46 PM   #4 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2007
Location: Ernakulam, Kerala, India
Model: 8320
Carrier: Airtel
Posts: 65
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi CJ

I don't know how you calculate the size, actually for installation you need only the *.jad & *.cod files for OTA Installation, and for installing via desktop *.alx & *.cod, the size of the application will be size of the *.cod files.

Please check that its the same size/similar size as its size was with J2ME.
__________________
Regards
Anand.
Offline  
Old 03-04-2009, 01:47 PM   #5 (permalink)
Thumbs Must Hurt
 
Join Date: May 2008
Model: 8700
PIN: N/A
Carrier: Telcel
Posts: 69
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Actually no

When I compiled my application the Java ME Platform SDK 3.0 early access, which is the succesor fo the Java Wireless Toolkit 2.5.2 with CLDC, .jar fiel was the one with the 5 mb file size, but that was beacuase it adde the whole net.rim api to the code, because i was adding BB specific api to be used on any other device, but when I deployed the application using the BB JDE, well, file size came down drastically, to 58kb, meaning that my .jar and .cod ain't carrying of the net.rim api cuz, ya know, BB JDE is built to deploy on BB.

I'm already set on the JDE, i don't like it as much a I came to love JME SDK 3.0 EA, specially the intellisens it has, but at least let me work with the code. Only issue i had was with the KSOAP library, good thing there were several other around here with the same problem and the solution to it.

Thanks for the help anyway. I'm having another issues now with the application, looking forward to get help on those if I cannot find a solution and don't find anything on the forum already posted
Offline  
Closed Thread


Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





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