Thursday, March 27, 2008

InvalidJadException in Netbeans Mobility Pack

If one comes across the following error in Netbeans 5.5 Mobility Pack with Sun Wireless Toolkit 2.5, then a possible reason could be that you copied the Midlet from another project and placed it into the mobile project where this error is occuring.

com.sun.kvem.midletsuite.InvalidJadException: Reason = 22
The manifest or the application descriptor MUST contain the attribute: MIDlet-1


This is how I fixed the problem:

In your problematic Netbeans Mobility Project go to /nbproject/project.properties
Search for the property "manifest.midlets". In my case, this property had no value and so I had to add one like this

manifest.midlets=MIDlet-1: , , \n

Put a new line feed "\n" if using Notepad in Windows. and include the space between the two commas above.

So for example:

manifest.midlets=MIDlet-1: HelloMidlet, , com.midlet.HelloMidlet

If there are other reasons/solutions to this above problems, please drop a line

Amazon EC2 and S3 Simplified

Amazon S3 is known as Simple Storage Services. It lets web sites store images, videos, and other heavy content on an Amazon Storage Server. As per the video below which gives more simplified information on this service, when you use twitter, the image icons are pulled from Amazon Storage services. Now, what is Elastic Computing Cloud (EC2).....it is a service that allows developers and startups, etc to build and provide their applications over a highly scalable server. The scalability increases with increase in number of requests. So basically S3 rents storage space and EC2 rents processing power. A set of services that can even let individual developers launch their applications at a cheap cost and high availability. Please view the video for more simplified description on these services and head on to Amazon for detailed information or to use it :)

Saturday, March 8, 2008

J2ME Wireless Toolkit creates temporary folder for its emulators

So you are using the FileConnection Optional Package in J2ME and you are wondering why the hell you can't read the files, you created. Well, this post helped me. It turns out, the first time you run your Wireless Toolkit Emulator, say with the DefaultColorSkin, WTK creates a in.use file in the $WTKHomeDir\emulator\appdb\DefaultColorPhone directory. Now, in my case, after closing the emulator, this file did not get deleted. Hence, the next time, I started the emulator, I could not see the files are saw the first time. This is because, the original DefaultColorPhone folder, is now locked by the presence of the in.use file. Hence, WTK creates a temporary folder like temp.DefaultCOlorPhone44 to run the midlet instead. Now you must either create your files in the fileSystem folder of this folder or delete the in.use file in the original, so that the emulator uses the original DefaultColorPhone folder and you can now see the files/folders created when you first ran the midlet