Hi all,

After reading headtailgrep's excellent documentation of how to do convert Midlets into .COD files and upload them onto your BB, I decided to write a batch file that automates all this. In order to use it, do the following:

1. Install the J2SE SDK and JRE exactly as headtailgrep described in his original post.
2. In your Windows Explorer, go to any directory that is included in your standard PATH (for example c:\windows would do), right-click and do New -> Text File. Call this text file "Mid2Cod.bat" and say "yes" on the question if you are sure to change the extension.
3. Copy and paste the batch file text that I have attached on the bottom of my post.
4. Make sure that the path after "SET JDEPATH=....." is correct for your installation of the JDE.
5. Save and exit from the editor.

How to use this batch file:
1. download your MidLet (.JAD and .JAR files) into some directory. Do Start->Run and type "cmd" (without the "") followed by <ENTER>.
2. In the DOS window, change directory (using "cd") to go to the directory where you stored your MidLet
3. Connect your Blackberry to the USB port, and type "Mid2Cod filename" followed by <ENTER>. Note, that the "" should not be typed, and that the filename must NOT have a .JAR or .JAD extension. So, for the "Virca" Midlet (Virca.jad / Virca.jar), type "Mid2Cod Virca".
4. Follow what's happening on the screen. After a while, it asks you to press a key to continue (if all went well). If you do so, the .COD file will be uploaded to your BB. If you are not ready to upload at that time, press CNTL-C.

Good luck! If you have any questions, feel free to email PM me.

--Ramon
