12-17-2010 03:20 PM
I know it is important to look for answers before posting and I have spent several hours doing so. I found a couple of related posts, but the solutions did not resolve my issue.
I have a J2ME application that is fully tested for game play. It runs just fine when it is installed as a jad/jar pair on every simulator and device I have tried. And the midlet icon appears in the phone interface, just as it should.
The game uses no RIM specific libraries or modules. As a jad/jar pair, the identical build runs on dozens of non-blackberry devices. Code in the jar detects that the phone is a blackberry using System properties and the game does its own minor configuring to look nice on a blackberry.
The next step is to convert the app to a cod file and sign it.
Using the JDE 6.0, I made a new project, imported the jad/jar and ran the Build command. The cod was created, and the jad modified accordingly. So far so good.
I have my signature credentials, and again, using the JDE, I ran Request Signatures. The interface reported success. No problems.
The cod file is 207k and consists of 4 cod files. I read the instructions for this case and unzipped the cod file into its 4 cod files. app.cod, app-1.cod, app-2.cod, app3.cod.
I posted the four cod files plus the jad file on my server, the same apache server where I routinely serve jar/jad files.
I triple checked the mime types in the .httaccess file. The mime types are correct for jar, jad and cod.
I point the browser on the Blackberry Simulator 18.104.22.1687 9800 to the jad file. I get the Download window with the jad properties and the Download button. I click Download. If I am doing this a second time, I get the Replace button, so the Simulator thinks the file has been downloaded, in that case.
It appears that the files are downloading. The watch cursor comes up 4 times, probably once for each cod file. No errors.
At the end of the download, I get a message "The application was successfully installed" and an OK button. But, no Run button, like I get with the jar installation. I click OK.
I exit the browser and go back to the main screen. There is no Download folder. The game is not in Games folder or Applications folder. If I go to Options/Applications, the game is not listed there.
If I menu click on the Options/Applications window, I get: JVM Error 104 Uncaught NullPointerException. However, I hadn't yet tried to run the application. A stack trace turned up a couple of odd lines:
UI - UIE no face detected
However, I don't know what generated these lines or when.
As an aside, I also tried downloading the full cod of 207k, and in that case I got the expected 907 error because the jad file was referencing cod files the server couldn't find as separate files.
I also tried downloading to other Simulators, for example 22.214.171.1245 9700. Like above, the files seem to download fine and I get the message: "The application was successfully installed" and an OK button. On this Simulator, there is a Download folder, but it is empty. The game is not in the Games or the Applications folder.
On this Simulator, I go into Options/Applications, and there is an entry for my game. The game title is correct, but there is no icon. I open the entry and I get the title properties and a Delete button. There is no Run button. It shows the installed date and another button for the Module properties. It also shows the size correctly, and the signer IDs.
I also tried this procedure on a physical device, the AT&T 8300. I got the same behaviour as the 9700 simulator. Again, there is no problem installing the jad/jar. The problem is with the jad/cod/cod-1/cod-2/cod-3
Why is this game appearing to download successfully, and installing successfully, but apparently failing to be installed so it can be run?
Thank you for your time.
Solved! Go to Solution.
12-17-2010 03:45 PM
I think the key here is that you are compiling using JDE 6.0, but attempting to run the program on a device with a lesser OS level. This is not supported.
If you want to support an 8300 with OS 4.5 (for example), then your code will need to be recompiled using JDE 4.5 (or lower)
12-17-2010 04:43 PM
Yes, I believe you are correct for the last 2 cases, but in the first case I am using a 6.0 version Simulator 6.0.0377 (9800) and a 6.0 version of the JDE.
Thanks for your response.
12-17-2010 09:21 PM
I believe I have discovered the problem. I skipped a step when making the cod file using a J2ME jar file as a source.
In the Projectroperties:Application panel, I did not enter the name of my main class in the field Name of main Midlet Class. Apparently this field causes the main class to be the entry point.
With the class entered into this field, and re-building the cod file and re-signing, I was able to download and run the game on a device.