New to Eclipse, using Ganymede.
Have it all setup with a nice Ant build script, and everything seems fine but when I run the program (which worked fine under the BB JDE), it runs into a Null Pointer exception because it can't find the bitmap resources.
My directory structure is this:
Code:
workspace
+
+--com_crackberry_launcher
+
+--bin
+--dist
+--src
+
+--com
+
+--crackberry
+
+--img (.png files here)
and the relevent code is:
Code:
public static void setColor(String color) {
icon1 = Bitmap.getBitmapResource(color + "A.png");
icon2 = Bitmap.getBitmapResource(color + "B.png");
HomeScreen.updateIcon(icon1, 1);
HomeScreen.setRolloverIcon(icon2, 1);
}
and part of the build.xml:
Code:
<target name="Build" description="builds application" depends="-Init">
<rapc output="${output}" destdir="${dist}" jdehome="${jdehome}" jdkhome="${javahome}">
<jdp type="cldc"
title="${title}" vendor="${vendor}"
version="${version}"
description="${description}"
systemmodule="true"
runonstartup="true"
startuptier="7" >
<entry
title="${title}"
arguments="click"
systemmodule="false"
runonstartup="false"
startuptier="7"
ribbonposition="0"
icon="OrangeA.png" />
</jdp>
<src>
<fileset dir="${src}">
<include name="**/*.java" />
<include name="*.png" />
<include name="resources/**/*.*" />
</fileset>
</src>
</rapc>
<copy todir="${simulator}" verbose="false">
<fileset dir="${dist}">
<include name="*.cod" />
<include name="*.debug" />
<include name="*.cso" />
</fileset>
</copy>
<echo message="Build ${build.number} complete." />
</target>
What am I doing wrong?
Also, when I right click and build, using Ant, I have to manually start the simulator by clicking "Launch Simulator" on the sim server. Is there a way to have it auto-launch?
Thanks