12-01-2009 10:49 AM
Hi,
I have several existing J2ME apps (for Sony Ericsson, Nokia etc) CLDC1.1 MIDP 2.0.
Now I would like to run them on BlackBerry.
Usually I'm using the newest eclipse 3.5.1 (using MTJ and in history eclipseme),
but had to downgrade to 3.4.1 to get BlackBerry IDE plugin installed (correct or is there a way to stay with eclipse 3.5.1?)
The BlackBerry HelloWorld runs now fine in the simulator.
But how can I tell my existing J2ME Midlet eclipse projects to be BlackBerry aware?
How to run them on the BlackBerry simulator or on real BlackBerry devices?
Thanks
Marcel
Solved! Go to Solution.
12-01-2009 02:17 PM
Technically your app should be fine as is. If you want to replace J2ME classes with native components then you create a new project, set the app settings to a BlackBerry app instead of MIDlet and change the UI code. Then you will have a native Blackberry app. If you want the app to remain cross-platform compatible then, as stated before, you are already done.
12-01-2009 03:05 PM
Hi,
thanks for the response.
However, I experience several problems deploying MyApp.jad and MyApp.jar:
1) I can't deploy it onto the BlackBerry 8800 T-Mobile test device i got today:
- Bluetooth seems to be not supporting OBEX
- No WLAN support
- OTA seems to fail as I use a E-Plus SIM card in a T-Mobile device (I believe this is somehow prohibited)
- USB cable with "Desktop Manager": I couldn't find out how to copy jad/jar to the BlackBerry directly
-> Now I create a MyApp.cod (with javaloader.exe) and an MyApp.axl XML file as a descriptor to be able to copy with "Desktop Manager" to the device.
Now the MyApp.jar starts fine (after changes as described in 2))
2) The created jar is obfuscated with proguard which worked fine for other mobile phones, but on BlackBerry I get:
Parsing classfile: k.class
MyApp.jar(k.class): Error!: Duplicate definition for 'k' found in: k
Setting with proguard: -dontusemixedcaseclassnames -dontnote -defaultpackage ''
didn't help (I hoped it could be a case insenitive thingi).
Now I don't obfuscate anymore, and the app starts on BlackBerry.
3) How can I debug the Midlet code on the simulator or on the BlackBerry directly with my eclipse setup?
I would like to keep the cross platform jad/jar project, but no "BlackBerry" specific menu is visible in
the Midlet project (as in a HelloWorld Blackberry project).
Thanks
Marcel
12-01-2009 03:33 PM
1) try downloading the jad and jar to the device SD card using the desktop manger media software.
on the device go to media->explore browse the download folder and activate the jad.
I think it works the same as OTA.
2) the BB has issues with obfuscated packages. there is an option in proguard to obfuscate the jar to be one level, i.e. no packages.
12-02-2009 12:27 AM
Try the following.
Run the .Jad file which will allow you to install the application.
If required, get the application signed
12-02-2009 01:07 AM
Marcel,
You can use the beta version of Blackberry Java plug-in (1.1.1) for Eclipse 3.5.1.
Regards.
12-08-2009 07:10 AM - edited 12-08-2009 07:56 AM
Thank you, I have done this now.
I have described my approach (the steps needed) in another thread:
I close this thread, the other thread is still open to gather more informations about this issue.
Marcel
12-08-2009 07:13 AM
You should provide a link to the other thread so if someone else has this problem they can find where you put the steps to resolve this. You should also mark this as solved.