Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
gewilson
Posts: 6
Registered: ‎09-10-2009
My Device: Not Specified
Accepted Solution

build problem in rapc - how do you do an automated build?

I am starting my first industrial BB development project.  I have a prototype that works in the Eclipse IDE plugin, and in the simulator.

I am using: BB JDE Eclipse plug-in Component Pack 4.5.0, and java 1.6.0_11.

 

The problem is I am trying to set up an incremental and automatic build system using bb-ant-tools, and in this environment I get the following error from rapc:

 

  [rapc] java.lang.Object: Warning! No definition found for method: clone

 

 I have also tried this with the BB JDE 4.5.0 environment, after noticing that the net_rim_api.jar files are different between the JDE and the plug-in.  But this did not make a difference.

 

 I then confirmed that the Object class in net_rim_api.jar DOES NOT have the method clone().  clone() is part of the J2SE 1.5 spec, and therefore would be in the libraries that are part of java 1.6 JDK.

 

 Then I confirmed, looking at the build logs, that all files were loaded either from the BB net_rim_api.jar or from one of my source files.

 

  So..  2 questions:

 

  1. any thoughts as to why clone() is not found?

  2. what is the recommend way of setting up an automated build system?

 

  Thanks in advance! 

New Developer
gewilson
Posts: 6
Registered: ‎09-10-2009
My Device: Not Specified

Re: build problem in rapc - how do you do an automated build?

Some more additional information:

 

I have tried using java jdk 1.4 and this problem goes away.  In 1.4 Object:clone() does not exist!!!

 

The problem is that bb-ant-tools requires java 1.5 or higher, AND using the Eclipse plug-in with java 1.6 WORKS!!

 

So, there must be some step of the compile process, my current suspicion is preverify, that is loading libraries from the compiler, NOT from the libraries in the classpath.

 

Here is how I am invoking rapc in my ant file:

 

        <rapc output="${cod.name}" generatesourcelist="true" destdir="${build.dir}" quiet="false" verbose="true">

            <jdp title="${cod.name}" version="1.0" vendor="Awsomecompany" type="cldc" ribbonposition="0" description="My awsome app" nameresourcebundle="com.awsome.comapny" nameresourceid="0">

                <!-- SRC element is a custom addition made to bb-ant-tools source code

                     to include RIM-MIDlet-Icon-1-* definitions in the JAD and MANIFEST files.

                     Without this, application code will have a NullPointerException for any

                     image. 

                      -->

             <!--  no images yet..

                <src>

                    <fileset dir=".">

                        <include name="src/**/*.png" />

                    </fileset>

                </src>

             -->

            </jdp>

            <src>

                <fileset dir="Dir1">

                    <include name="src/**/*.java" />

                    <include name="src/**/*.rrc" />

                    <include name="src/**/*.rrh" />

                </fileset>

                <fileset dir="Dir2">

                    <include name="src/**/*.java" />

                    <include name="src/**/*.rrc" />

                    <include name="src/**/*.rrh" />

                </fileset>

            </src>

        </rapc> 

 

New Developer
gewilson
Posts: 6
Registered: ‎09-10-2009
My Device: Not Specified

Re: build problem in rapc - how do you do an automated build?

I have solved the problem.

 

Buried down in one of my source files was a call to clone(), which is not in the Object class included in net_rim_api.jar.

 

After removing these calls the application compiles, loads, and runs on a phone just fine.

 

I highly recommend bb-and-tools, available on source forge, for automated builds!