BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 05-19-2008, 07:54 AM   #1
tschiefer
Knows Where the Search Button Is
 
Join Date: Jul 2007
Model: 8800
PIN: N/A
Carrier: t-mobile
Posts: 44
Lightbulb Integrating Eclipse and Blackberry SDK

Please Login to Remove!

I migrated the HowTo of integrating the Eclipse and the BB SDK to a new location.

This howto showes how to get Eclipse with BB developer stuff to work.
The instructions are step by step and proven to work.

HowTo Eclipse and Blackberry
Offline  
Old 05-19-2008, 09:25 AM   #2
Danila
New Member
 
Join Date: Apr 2006
Location: Kehl, Germany
Model: 8100
Carrier: Vodafone Germany
Posts: 2
Default

I'm not sure if there is a difference, but why not just using RIM's Eclipse Plugin?
Offline  
Old 05-19-2008, 09:51 AM   #3
simon.hain
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Default

Quote:
Originally Posted by Danila View Post
I'm not sure if there is a difference, but why not just using RIM's Eclipse Plugin?
because it is beta. i was very excited when i finally got it and spent a couple of days with attempts to integrate it into a working productive enviroment, with no success. as even simple questions for support take about two weeks i am not going to spend my office time beta-testing.
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 05-21-2008, 11:04 AM   #4
pacred
New Member
 
Join Date: May 2008
Model: 8800
PIN: N/A
Carrier: tmobile
Posts: 4
Default

Go with the Eclipse IDE, trust me..... I found the Blackberry JDE 4.3 to be so bug-ie that it will cleanly compile code with big errors. Then when you load it onto your phone certain feature just won't work. Like I had a Sprite class that would tile across the screen instead of doing what my code instructed it to do. Very frustrating. The Eclipse version would not cleanly compile this code.
Offline  
Old 05-21-2008, 11:14 AM   #5
Danila
New Member
 
Join Date: Apr 2006
Location: Kehl, Germany
Model: 8100
Carrier: Vodafone Germany
Posts: 2
Default

That's interessting because both are just executing the same rapc compiler to generate the cod file... So how could that happen?
Offline  
Old 05-22-2008, 03:22 AM   #6
simon.hain
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Default

eclipse does not use rapc. the ant-script uses rapc to build a cod while eclipse uses its internal compiler.
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 06-20-2008, 07:59 PM   #7
plevintampabay
Thumbs Must Hurt
 
Join Date: Jun 2008
Model: 8820
PIN: N/A
Carrier: AT&T
Posts: 72
Exclamation

The document referenced at the top of this thread says to download a RAPC ant task jar file from http://www.etaras.com/blackberry/rapc/.
I believe the file that should download is anttask-rapc-1.8.jar.
This file does not exist at this site.

I found a post in this forum where someone attached the anttask-rapc-1.8.jar file to the post. But clicking on that attachment now opens an empty web page. No files is available to download.

In that same post, the person suggested using bb-ant-tools from SourceForge.net: Files
At this point, I don't know if it will work.

Does anyone have the original anttask-rapc-1.8.jar file, and/or do you know if the bb-ant-tools will also work?

Thanks
Offline  
Old 06-22-2008, 09:09 AM   #8
cunac
New Member
 
Join Date: Oct 2007
Model: BOLD
PIN: N/A
Carrier: Rogers
Posts: 9
Default

Quote:
Originally Posted by simon.hain View Post
because it is beta. i was very excited when i finally got it and spent a couple of days with attempts to integrate it into a working productive enviroment, with no success. as even simple questions for support take about two weeks i am not going to spend my office time beta-testing.
what problems did you have, I have plugin working without glitch , even request signature works from IDE.
Offline  
Old 06-22-2008, 01:37 PM   #9
plevintampabay
Thumbs Must Hurt
 
Join Date: Jun 2008
Model: 8820
PIN: N/A
Carrier: AT&T
Posts: 72
Unhappy

Ok, so I used bb-ant-tools from SourceForge .
I then had to make several changes to the build.xml Ant script. I'm just a beginner with Ant so I'm not sure if what I have is correct, but it does build my HelloWorld program.

Code:
<?xml version="1.0" encoding="UTF-8"?>
<project name="HelloWorld" default="buildRIM" basedir=".">
	<taskdef resource="bb-ant-defs.xml" classpath="lib/bb-ant-tools.jar" />
	<property name="jdehome" value="C:\Program Files\Research In Motion\BlackBerry
JDE 4.2.1" />
	<property name="javahome" value="C:\Program Files\Java\jdk1.5.0_11"/>
	<property name="simulator" value="${jdehome}\simulator" />
	<property name="bin" value="${jdehome}\bin" />
	<target name="debug" depends="buildRIM">
		<copy todir="${simulator}" overwrite="true">
			<fileset dir=".">
				<include name="*.cod" />
				<include name="*.debug" />
				<include name="*.csl" />
				<include name="*.cso" />
			</fileset>
		</copy>
		<exec executable="cmd.exe" dir="${bin}" spawn="true">
			<arg value="/c" />
			<arg value="jdwp.bat" />
		</exec>
	</target>
	<target name="simulate" depends="deploy">
		<exec executable="cmd.exe" dir="${simulator}" spawn="true">
			<arg value="/c" />
			<arg value="8120.bat" />
		</exec>
	</target>
	<target name="deploy" depends="buildRIM">
		<copy todir="${simulator}" overwrite="true">
			<fileset dir=".">
				<include name="*.cod" />
				<include name="*.debug" />
				<include name="*.csl" />
				<include name="*.cso" />
			</fileset>
		</copy>
	</target>
	<target name="buildRIM" description="Composes RIM">
		<rapc jdehome="${jdehome}" jdkhome="${javahome}" output="helloworld" >
			<jdp title="HelloWorld" vendor="IDRS" version="0.1" description="test program" runonstartup="false" type="cldc" />
			<src>
				<fileset dir=".">
					<include name="**/*.java" />
					<include name="resources/**/*.*" />
				</fileset>
			</src>
		</rapc>
	</target>
</project>
If you are going to use this, be sure to edit the property values for jdehome and javahome. You may need to change the simulator bat file to run (in the simulate target), and you will need to change the parameters to jdp in the buildRIM target.

All that said, I'm afraid the debugger did not work correctly. Here is my simple HelloWorld program.

Code:
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.component.LabelField;
import net.rim.device.api.ui.container.MainScreen;

public final class HelloWorld extends UiApplication 
{
	public HelloWorld() 
	{
		super();
		MainScreen screen = new MainScreen();
		String s = "Hello World!";
		screen.add(new LabelField(s));
		pushScreen(screen);
	}

	public static void main(String[] args) 
	{
		HelloWorld hw = new HelloWorld();
		hw.enterEventDispatcher();
	}
}
The debugger would not stop at a breakpoint set on any ine in main(). In HelloWorld() it would not show me the value of 's', saying it was not accessible.

While stopped in HelloWorld() I could not figure out how to move up the call stack, but it may be that I just don't know how to do that in Eclipse (which is also brand new to me).

cunac - thank you for your post about the plugin, as I will give that a try next. Do you have the debugger working fully? Can you view local variables, step in and out of methods (not just step over), and move up the call stack?

Thanks
Offline  
Old 06-22-2008, 04:19 PM   #10
plevintampabay
Thumbs Must Hurt
 
Join Date: Jun 2008
Model: 8820
PIN: N/A
Carrier: AT&T
Posts: 72
Default

Well so much for the BlackBerry plugin.
I downloaded it from BlackBerry - BlackBerry JDE Plug-In for Eclipse
But when I tried to install it, it gave an error that the version of Eclipse that I have (3.3.2 - the current and only version available from eclipse.org) is not compatible with the plugin (who is expecting 3.3.1). I told it to install anyway, but then when I run Eclipse I get an error when it starts and none of the Preference windows relating to the BB can be opened.

I'm sorry but I have to say that for a dot release in Eclipse to totally break the plugin is rather lame on the part of RIM. I send an email to RIM and hopefully they can issue an update to the plugin quickly. I'll post updates as they develop.

Does anyone have any other work arounds / usable suggestions ?
Offline  
Old 06-22-2008, 05:30 PM   #11
georg
Knows Where the Search Button Is
 
Join Date: Jun 2005
Location: Berlin
Model: 9500
OS: v4.7.0.78
PIN: 20CAFA18
Carrier: O2
Posts: 39
Default

I have used Eclipse as of shortly and moved to Eclipse with BB plugin. Not everything is working nice and its greeting me with an error message every time it starts but nevertheless I do no maintenance of compilation resources and no ant installation anymore.
Offline  
Old 06-23-2008, 06:31 AM   #12
shraddha294
Thumbs Must Hurt
 
shraddha294's Avatar
 
Join Date: Oct 2007
Location: Hyderabad
Model: 8800
PIN: N/A
Carrier: TMobile
Posts: 111
Exclamation

Quote:
Originally Posted by Danila View Post
I'm not sure if there is a difference, but why not just using RIM's Eclipse Plugin?
the known issues list that comes with the plug-in explains it all.
Some of them are critical issues to have in a development software... though yes, its much better than JDE and good for smaller projects.
Waiting for more stable version.... it'll make BB development so much convenient....
Offline  
Old 06-25-2008, 01:02 AM   #13
shraddha294
Thumbs Must Hurt
 
shraddha294's Avatar
 
Join Date: Oct 2007
Location: Hyderabad
Model: 8800
PIN: N/A
Carrier: TMobile
Posts: 111
Default

Hi Paul...
here's the problem in the script you r using....
Quote:
Originally Posted by plevintampabay View Post
Ok, so I used bb-ant-tools from ....
Code:
<?xml version="1.0" encoding="UTF-8"?>
		<exec executable="cmd.exe" dir="${bin}" spawn="true">
			<arg value="/c" />
			<arg value="jdwp.bat" />
		</exec>
	</target>
The parameter u r sending in executable is incorrect ... this is what it should be:

<exec dir=$<Specify JDE directory>$ executable="/bin/jdwp.bat" />

dir is optional... this is how i use in my build script. The name of the executable should be JDWP.bat

Last edited by shraddha294; 06-25-2008 at 01:03 AM..
Offline  
Old 06-25-2008, 02:51 PM   #14
plevintampabay
Thumbs Must Hurt
 
Join Date: Jun 2008
Model: 8820
PIN: N/A
Carrier: AT&T
Posts: 72
Thumbs up

Thanks for the suggestion shraddha294.

In my Ant script (shown above in this thread), I actually am calling jdwp.bat in my debug target.

In my simulate target is where I was calling 8120.bat. At the moment I don't really care about the simulate target.

But I may have discovered part (or most) of the problem. Eclipse was not using my Ant script to build or to run the debugger. I now have Eclipse using it for building (having added a custom Builder). I can not yet get Eclipse to use the Ant script for debugging. I'm using the Ant Viewer and am trying to run my debug target from that viewer, but it is not being called. I've posted to an Eclipse newsgroup about that issue.

Finally I have a problem with displaying String variables in the Eclipse debugger, but I'll put that in a separate post in this forum.

Thanks,
Paul
Offline  
Old 12-08-2008, 04:15 AM   #15
momolulu
New Member
 
Join Date: Dec 2008
Model: 8100
PIN: N/A
Carrier: att
Posts: 1
Default no bb-ant-defs.xml ?

hi,
I have followed the steps , and encountered an error after paste the build.xml, it seems can not find bb-ant-defs.xml, and i searched my computer, there is not such a file in it , anyone encountered the same question?

mujun
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


Audio Polarity Checker Phase Detector Self-Test Auto-Off PD-9A Speaker Tester picture

Audio Polarity Checker Phase Detector Self-Test Auto-Off PD-9A Speaker Tester

$43.00



PD-9A Polarity Checker Phase Detector Self-Test Auto-Off Audio Speaker Testing picture

PD-9A Polarity Checker Phase Detector Self-Test Auto-Off Audio Speaker Testing

$45.00



Honeywell Quartz Polarity Sensitive Hour Meter 85098 picture

Honeywell Quartz Polarity Sensitive Hour Meter 85098

$79.99



Allen Bradley 937ZH-DPBN-2 Intrinsic Safety Zener Barrier, Positive Polarity DC picture

Allen Bradley 937ZH-DPBN-2 Intrinsic Safety Zener Barrier, Positive Polarity DC

$139.99



Dairyland PCR-5KA Polarization Cell Replacement With Box. picture

Dairyland PCR-5KA Polarization Cell Replacement With Box.

$299.99



Polarity Relay fits Belarus 802 922 560 822 572 902 562 825 570 805 820 800 905 picture

Polarity Relay fits Belarus 802 922 560 822 572 902 562 825 570 805 820 800 905

$210.29







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