03-30-2010
05:32 AM
- last edited on
03-07-2011
03:08 PM
by
MSohm
Hi Everyone,
When I build my active blackberry configuration, I am receiving the error:
I/O Error: Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified
rapc executed for the project MyApplication
This happens when I have this code:
LabelField lblTitle = new LabelField(title) {
protected void paint(Graphics graphics) {
graphics.setColor(0x00FFFFFF);
graphics.clear();
super.paint(graphics);
}
};
LabelField lblSubTitle = new LabelField(releaseYear + ", " + rating) {
protected void paint(Graphics graphics) {
graphics.setColor(0x00FFFFFF);
graphics.clear();
super.paint(graphics);
}
};
vfmHeader.add(lblTitle);
vfmHeader.add(lblSubTitle);
screen.add(vfmHeader);
If I were to remove the overrided paint() method in the lblSubTitle LabelField, however, the build error does not show up. I tried changing lblSubTitle from a LabelField to a RichTextField, and I still receive the same error.
Very strange. Does anyone know why this is happening? Thanks!
Solved! Go to Solution.
03-30-2010 10:35 AM
UPDATE: It seems that this is happening from too much UI code? Is this possible? If I keep in the code shown in my original post, and comment out some other UI code, it will work.
Also, I have another class which has a bunch of UI code and the same thing is happening. When I add a new Field, I get the error. But if I keep in that new field and comment out some other code, it will work.
Please tell me that there is some sort of solution for this...
03-30-2010 10:51 AM
Split your code up into smaller classes?
03-30-2010 11:15 AM
That's what I'm going to try, thanks.
03-30-2010 01:42 PM
i created an additional 2 classes to split up my code. When I buld the active blackberry configuration, I am still receiving the error. If I comment out the code in the additional two classes and then build, it will do so successfully.
If I uncomment all of the code in the two classes and remove the overrided paint() methods, it will work.
So it seems that something about overriding the paint methods is causing the error. I am so confused as to why this would be happening. Any ideas, anyone?
Thanks.
03-30-2010 03:22 PM
What OS level are you compiling using? Eclipse or JDE?
have you tried using another level?
03-30-2010 03:46 PM
I am using Windows XP mode on Windows 7. I had tried using Windows 7 and Vista in the past, and simulator didn't seem to play nice with it.
I am using the Eclipse JDE plug-in.
I am currently installing XP on a spare desktop computer that I have, and I am going to try installing Java and the Eclipse JDE plug-in on that. Once that's all set up and configured, I plan to try and build my code on that machine...
Any other suggestions in the meanwhile?
Thanks!
03-30-2010
08:34 PM
- last edited on
03-07-2011
03:09 PM
by
MSohm
I have tried installing the BlackBerry Eclipse JDE Plug-In on another computer running Windows XP. I am still receiving the error, however it is providing more details:
I/O Error: CreateProcess: jar -cfm "C:\Documents and Settings\Kevin\workspace\.BlackBerry\..\MyApplication\MyApplication.jar" C:\DOCUME~1\Kevin\LOCALS~1\Temp\rapc_055a6b49.dir\ META-INF\MANIFEST.MF -C ..\MyApplication MyApplication.cod -C ..\MyApplication MyApplication -1.cod -C ..\MyApplication MyApplication-2.cod -C ..\MyApplication\MyApplication.csl -C ..\MyApplication MyApplication.cso -C C:\DOCUME~1\Kevin\LOCALS~1\Temp\rapc_055a7b78.dir . error=2
rapc executed for the project MyApplication
I then opened up a command window and typed:
jar -cfm "C:\Documents and Settings\Kevin\workspace\.BlackBerry\..\MyApplication\MyApplication.jar"
Which gave me the following:
What do you guys think? I really need to get this project back on track...
04-02-2010 05:04 AM
I found the solution to my problem here:
http://www.blackberryforums.com/rim-software/79668
Basically, I removed all installed versions of Java that I had and I installed the following:
j2sdk-1_4_2_15-windows-i586-p.exe (JDK 1.4.2 version 15)
jdk-1_5_0_12-windows-i586-p.exe (JDK 1.5.0 version 12)
JDK 1.5.0 is needed because otherwise the Eclipse JDE plug-in will not start with 1.4.2.
Without having JDK 1.6, however, the MDS-CS will not launch (within Eclipse). So I had to manually download "BlackBerry Email and MDS Service Simulators 4.14", start it, and then run my application.
I hope that this can help somebody down the line...