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


ridgeBoy said...

IT RULES!!!!!!!!!!!!!!!!!


:) :) :) :):) :):) :)


Thanx in advance

Anonymous said...

Thanks man, got it working.

Omar Rehman said...

Thanks for the tip. :)