| »Sponsored
Links |
BlackBerryApps.com Best Sellers
|
|
 |
|
New Member
Posts: 4
Join Date: Aug 2006
Model: 8700c
|
integrating eclipseME and BlackBerry SDK -
08-15-2006, 04:54 PM
Hi All,
My team is about to port J2ME app to BlackBerry. The J2ME app was developed on Eclipse using EclipseME (for mobile) and the team does not want to use the "crappy" JDE comes with the BlackBerry SDK. So as a new guy, I got the task. I think I figure out a relatively painless way of doing this and I'd like to share with you all.
I assume you have been using eclipseME for mobile development so I will skip all the unneccessary details regarding eclipseME ([eclipseme.org]).
1) Create a eclipseME HelloWorld project.
2) On the buildpath, add a reference to external JAR file, net_rim_api.jar.
3) Export the attena build files (right click on the project, J2ME->export antenna).
4) Added the following to user-build.properties (with the correct SDK path)
bb.buildjars.home=C\:\\Java\\j2me\\RIM\\BB_JDE_4.1 \\bin
bb.simulator=C\:\\Java\\j2me\\RIM\\BB_JDE_4.1\\sim ulator
bb.api.jar=C\:\\Java\\j2me\\RIM\\BB_JDE_4.1\\lib\\ net_rim_api.jar
5) Added the following line to HelloWorld.jad if you are using RIM UIApplication (very important, it took me a couple of hours to debug this), MIDlet-1: HelloWorld (for J2ME midlet, it is automatically added when u package the JAR file).
5.5) Needs to create HelloWorld.alx file:
<loader version="1.0" />
<application id="HelloWorld">
<description>Sample app</description>
<version>1.0</version>
<vendor>My vendor</vendor>
<fileset Java="1.0">
<files>HelloWorld.cod</files>
</fileset>
</application>
</loader>
6) Add the following targets to the build.xml exported by J2ME:
<!-- Package up for black berry debugging -->
<target name="bb_build" depends="jar" description="Package for black berry debugging">
<echo message="path.build.output=${path.build.output}" />
<wtkrapc jadfile="${path.build.output}/${midlet.name}.jad" source="${path.build.output}/${midlet.name}.jar" codename="${midlet.name}" import="${bb.api.jar}" destdir="${path.build.output}/cod" midlet="false" />
<antcall target="bb_copy" />
</target>
<!-- copy files to bb simulator -->
<target name="bb_copy" description="Copy files to BB simulator" >
<copy todir="${bb.simulator}" overwrite="true">
<fileset dir="${basedir}">
<include name="*.cod" />
<include name="*.debug" />
<include name="*.alx" />
<include name="*.cso" />
</fileset>
</copy>
</target>
<!-- unload the midlet to the black berry device -->
<target name="bb_unload" description="Unload the midlet to the BB device.">
<exec executable="${bb.buildjars.home}\javaloader.exe">
<arg line="-usb erase ${midlet.name}.cod" />
</exec>
</target>
<!-- load the midlet to the black berry device -->
<target name="bb_load" depends="bb_unload" description="Load the midlet to the BB device.">
<exec executable="${bb.buildjars.home}\javaloader.exe">
<arg line="-usb load ${basedir}\${midlet.name}.cod" />
</exec>
</target>
7) To debug, first u need to execute bb_build, then you need to start(create) a Java Remote Application session. See [www dot blackberry dot com/developers/forum/thread.jsp?forum=1&thread=7730&message=28238&q=ecl ipse#28238] for reference. (The forum does not allow me to post URL until I have more than 10 posts hence the dot).
I think that should cover it. I am in the process of convicing the eclipseME owner to do the BlackBerry plugin or helping me getting started. Until then, you will need to add one extra step (bb_build) before you can debug.
Note: I have yet to figure out how to do internationalization for BB app (.rrh) on eclipse. Might be someone can share his/her experience.
Cheers,
Tom
Last edited by ppngiap : 08-15-2006 at 05:19 PM.
|
|
|
|
|
New Member
Posts: 4
Join Date: Aug 2006
Model: 8700c
|

08-15-2006, 05:17 PM
Forgot step 5.5, needs to create .alx file:
<loader version="1.0" />
<application id="HelloWorld">
<description>Sample app</description>
<version>1.0</version>
<vendor>My vendor</vendor>
<fileset Java="1.0">
<files>HelloWorld.cod</files>
</fileset>
</application>
</loader>
|
|
|
|
|
New Member
Posts: 13
Join Date: Jan 2006
Model: -
|
RAPC ant task -
08-16-2006, 03:43 AM
If you want to utilize BlackBerry-specific options of your J2ME project (icons, autostartup, etc.) you can also use RAPC ant task.
|
|
|
|
|
Knows Where the Search Button Is
Posts: 19
Join Date: Aug 2006
Model: 7105T
Carrier: T-Mobile
|
RAPCS and stdout -
08-16-2006, 12:35 PM
Were you able to get STDOUT to be directed to the console where you ran the Ant task from? I still can't get that working...and I think it's because fledge is designed to be remote controlled (i.e., that's crap!)
As for the rapc task, the thing I find disturbing is that it builds all its files in the project's basedir. That is craptastic and a hideous implementation decision. Anyone have any workarounds? 
|
|
|
|
|
New Member
Posts: 13
Join Date: Jan 2006
Model: -
|
What's wrong? -
08-18-2006, 04:47 AM
There is no problem with output from RAPC ant task. If you want more details than a command line that is passed to RAPC compiler you can always remove options="-quiet" attribute from a project element.
Now about files that are built. Why do you think that it always builds all the files in the project's basedir? Files to be built are defined with the help of FileSet Ant type. If you customize FileSet to include all .java files in basedir it is your choice. But you can define more comples rules which files to build with the help of PatternSets and Selectors. So, the workaround is to read Ant manual. 
|
|
|
|
|
New Member
Posts: 2
Join Date: Oct 2004
Model: 9000
Carrier: vodafone
|
WtkRapc vs. RAPC ant task -
12-01-2006, 05:49 AM
Antenna's WtkRapc Ant task is designed for converting a MIDlet into a BB application (JAR -> COD), while "RAPC ant task" perfectly builds more sophisticated BB applications.
|
|
|
|
|
New Member
Posts: 2
Join Date: Feb 2007
Model: 8100
|
create alx using in eclipse? -
02-08-2007, 07:29 AM
I am trying to build the blackberry using eclipse and so far I got to the stage of converting to a cod format file but due no alx present, the build fails.
Does anyone know how to create an alx file or convert from jad to alx using an external tool that can be called using ant/antenna in eclipse same as calling the rapc to convert the jar to cod.
thanks,
|
|
|
|
|
Thumbs Must Hurt
Posts: 181
Join Date: Jan 2007
Model: 8800
Carrier: Orange
|

02-08-2007, 08:12 AM
Just do it by hand, they are very simple and don't ever need to be updated. The example given above was:
Code:
<loader version="1.0" />
<application id="HelloWorld">
<description>Sample app</description>
<version>1.0</version>
<vendor>My vendor</vendor>
<fileset Java="1.0">
<files>HelloWorld.cod</files>
</fileset>
</application>
</loader>
Just change the values to your own
|
|
|
|
|
CrackBerry Addict
Posts: 714
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
|

02-08-2007, 08:32 AM
it's the same with netbeans - you create an .alx manually and automate it using the build script (build.xml):
<copy file="${name}.alx" todir="${dist.dir}"/>
if you have the time you could create a console app that reads the jad and writes out an alx as part of your build process but i'm not sure it's worth the effort.
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
|
|
|
|
|
Knows Where the Search Button Is
Posts: 43
Join Date: Jul 2007
Model: 8800
PIN: N/A
Carrier: t-mobile
|
Eclipse and Blackberry IDE -
07-05-2007, 05:21 AM
I'm trying to convince eclipse to work together with the Blackberry JDWP. I think i'm very close but it is not completely working yet. Would be nice, if someone could give me a hint.
Here is, what i've done so far:
1) Installed EclipseME on Eclipse
2) Created a new EclipseME Project
3) Read the Blackberry JDE Development Guide Appendix: The eclipse development and changed following things to eclipse:
3.1) Created a new JRE with net_rim_api.jar included
3.2) Created a new Builder for my project using the rapc.exe
and gave the builder the following arguments
-quiet C:\Development\J2MEProject\src\*.java import=”C:\Program Files\Research In Motion\BlackBerry JDE 4.1.0\lib\net_rim_api.jar” codename="C:\Program Files\Research In Motion\BlackBerry JDE 4.1.0\simulator\J2MEProject"
4) Implemented a simple HelloWorldApplication. Works fine in the Blackberry IDE - i've already tested it there.
5) Start JDWP
6) Run -> Debug Dialog -> Remote Java Application -> Debug
So far so good. In the ...BlackBerry JDE 4.1.0\simulator directory there pop up
J2METest.cod
J2METest.cso
J2METest.debug
J2METest.jar
J2METest.jad <-- this file doesn't appear, when i run HelloWorld from the Blackberry IDE
Problem is: In the BlackberrySimulator i don't find my J2METest Application under Applications.
So i generated a J2METest.alx file, which looks like this
<loader version="1.0" />
<application id="J2METest">
<description>Sample app</description>
<version>1.0</version>
<vendor>My vendor</vendor>
<fileset Java="1.0">
<files>J2METest.cod</files>
</fileset>
</application>
</loader
And i've read from the posting above, that i have to insert MIDlet-1: J2METest into the .jad file. So i've done that and it now looks like this
Manifest-Version: 1.0
RIM-COD-Module-Name: J2METest
RIM-COD-Module-Dependencies: net_rim_cldc
MIDlet-Jar-Size: 2269
RIM-COD-Creation-Time: 1183626839
MIDlet-Jar-URL: unknown
RIM-COD-URL: J2METest.cod
RIM-COD-SHA1: f3 a2 cd 15 46 2e cd 49 56 51 d2 19 33 ac 76 eb 0f 16 92 86
RIM-COD-Size: 884
MicroEdition-Configuration: CLDC-1.1
MIDlet-1: J2METest
MIDlet-Version: 0.0
MIDlet-Name: unnamed
MIDlet-Vendor: anonymous
MicroEdition-Profile: MIDP-2.0
Actually i have two .jad files, one in my eclipseMe project and one which is generated in the ...BlackBerry JDE 4.1.0\simulator directory.
I would be pleased about any idea.
If not absolutely necessary i rather would like to let antenna beside in this stage of development.
|
|
|
|
|
Knows Where the Search Button Is
Posts: 43
Join Date: Jul 2007
Model: 8800
PIN: N/A
Carrier: t-mobile
|

07-06-2007, 04:38 AM
 yeah, I did it. I wrote a .pdf, on where I did something wrong and how to do it the right way. Because the instruction above is for porting a MIDlet onto a Blackberry, what I didn't realized in first place.
What i want to do is creating Blackberry applications (.cod) and here is the way to how to do that.
Index of /~tschief/Div
Last edited by tschiefer : 05-19-2008 at 08:34 AM.
Reason: new location for HowTo
|
|
|
|
|
New Member
Posts: 6
Join Date: May 2007
Model: 8100
PIN: N/A
Carrier: Hutch
|

10-01-2007, 08:30 AM
I an using eclipse and JDE together.I mean I compile my programs in eclipse and copy paste it to JDE and then give a buildAll to generate cod files.
Recently I encountered a problem when i used ResourceBundle.I created rrh and rrc files.And in my java files i implemented the Interface(The rrh file name followed by "Resource") then eclipse is not able to compile the code.
Can anyone help me in this regard..
|
|
|
|
|
New Member
Posts: 4
Join Date: Oct 2007
Model: 8300
PIN: N/A
Carrier: Movistar
|
How to use Resourses RRH RRC with Eclipse? -
10-18-2007, 12:07 PM
Does anyone know how to user ResourcesBundle with Eclipse?
Regards,
Lionel
|
|
|
|
|
New Member
Posts: 11
Join Date: Apr 2007
Model: 8100
Carrier: Cingular
|

10-18-2007, 02:10 PM
Quote:
Originally Posted by lionelp
Does anyone know how to user ResourcesBundle with Eclipse?
Regards,
Lionel
|
If you include the rrc, rrh, and init.java files rapc.exe will build them. The interface is built by the BB JDE, so if you want to use those constants in Eclipse, you have to make that file.
|
|
|
|
|
New Member
Posts: 4
Join Date: Oct 2007
Model: 8300
PIN: N/A
Carrier: Movistar
|
Resources Files RRH and RRC with Eclispe -
10-19-2007, 10:53 AM
Does anyone could explain in details how to use Eclipse with Resources Files? And How to compile?
I use EclipseME and Antenna.
Regards,
Lionel
|
|
|
|
|
New Member
Posts: 1
Join Date: Nov 2007
Model: 831-
PIN: N/A
Carrier: AT&T
|
great idea but broken link -
11-18-2007, 03:57 PM
i'd be very interested in taking a look at this document, but the url doesn't seem to be working any more
is there an updated link?
Quote:
Originally Posted by tschiefer
 yeah, I did it. I wrote a .pdf, on where I did something wrong and how to do it the right way. Because the instruction above is for porting a MIDlet onto a Blackberry, what I didn't realized in first place.
What i want to do is creating Blackberry applications (.cod) and here is the way to how to do that.
www.eltoro.at.tt/Div
|
|
|
|
|
|
New Member
Posts: 7
Join Date: Apr 2007
Model: 8320
PIN: N/A
Carrier: TIM
|
Proguard -
02-27-2008, 08:41 PM
Hi, do you know how to use Proguard obfuscation with this build.xml?
|
|
|
|
|
Knows Where the Search Button Is
Posts: 43
Join Date: Jul 2007
Model: 8800
PIN: N/A
Carrier: t-mobile
|
Location for HowTo changed -
05-19-2008, 08:32 AM
sorry i wasn't paying attention, that the address wasn't reachable.
Following link is working:
Index of /~tschief/Div
|
|
|
|
|
Thumbs Must Hurt
Posts: 150
Join Date: May 2007
Location: Bulgaria
Model: none
PIN: N/A
Carrier: Mtel
|

06-12-2008, 06:56 AM
I have a problem that still can not solve. I have a project in Eclipse, build it, start it on the simulator. But when I want to debug the application, I have some problem. I made the same steps as typed in the .pdf file, but when I am trying to debug through JDWP using Eclipse I put some breakpoints, started the simulator but the application I want to open, is not opening, but the simulator is launched. When I go to the application by myself and open it, it is working, but the breakpoints are not working, the application is not stopping where the breakpoints are set. System.out.println() is working but it is better to debug in the ordinary way with breakpoints and to see the values of the properties and arguments in the application. Is there anyone that knows where is the problem? Thanks !
|
|
|
|
|
Knows Where the Search Button Is
Posts: 26
Join Date: Apr 2008
Model: 8800
PIN: N/A
Carrier: Orange
|

06-13-2008, 06:30 AM
why not use RIM's blackberry plugin for eclipse?
|
|
|
|
|
Thumbs Must Hurt
Posts: 150
Join Date: May 2007
Location: Bulgaria
Model: none
PIN: N/A
Carrier: Mtel
|

06-13-2008, 07:44 AM
Because I think it is still buggy. It is a beta version. I am waiting for the official release. 
|
|
|
|
|
Knows Where the Search Button Is
Posts: 26
Join Date: Apr 2008
Model: 8800
PIN: N/A
Carrier: Orange
|

06-13-2008, 10:37 AM
I'm using it and it works nicely.
and RIM are giving free email support for it.
|
|
|
|
|
Thumbs Must Hurt
Posts: 150
Join Date: May 2007
Location: Bulgaria
Model: none
PIN: N/A
Carrier: Mtel
|

06-16-2008, 02:34 AM
Ok, I will install it again. Thanks !
|
|
|
|
|
Thumbs Must Hurt
Posts: 150
Join Date: May 2007
Location: Bulgaria
Model: none
PIN: N/A
Carrier: Mtel
|

06-25-2008, 04:17 AM
I have a problem. Installs the BlackBerry JDE Plug-in for Eclipse. Then creates a new project. I have a project in eclipse and use ant build with .xml file to build my project. Now I have two possible ways as i see. The first one is to copy the sources to the new "EclipseBerry" (let call it like that) project, the project build itself, and everything is working, but the images for the project (i have about 100 images) have to be added to the project. The one way is to use ResourceBundle, but can i use it for images (I have never used the .rrc and .rrh files and the ResourceBundle). So how can I add my images. The other way is to right click on the project, then "Add File to BlackBerry Project", but i need to do this for about 100 times, it is not clever. The other way to move my Eclipse project ot my EclipseBerry project is to use the build.xml file to build my .cod file where the ant adds the images to the .jar file, but i am not sure this will work fine. What do you know about my problem? Thanks !
|
|
|
|
|
New Member
Posts: 14
Join Date: Nov 2008
Model: Storm
PIN: N/A
Carrier: Vodafone
|
how to plugin BlackBerry JDE to Eclipse -
11-17-2008, 01:25 AM
please help me i am unable to plugin JDE into Eclipse
|
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|