First you'll need to get your hands on the cod files for the application. There are many ways to do this. Personally I use the OTAloader mentioned elsewhere on the forum. Sometimes, I load the application via the desktop manager or OTA and then pull the cod files off with the Blackberry Master Control Program.
Make sure that you use WinZip (or whatever you use for zips) to extract the cod files from within the large cod files. Most cod files over 200K are probably zip files. Just open anything near that with WinZip and see if there are files to be extracted.
Now you need to create a jar file. You can do this manually, but some applications have quite a lot of cod files so I wrote a short VB script to do it for you. Just run this script from the directory containing the cod files and it will create a template jad file for you. Here's the script:
CreateJad.vbs
Dim MyFileSystem, MyFolder, MyFile, MyFileCollection
Set MyFileSystem = CreateObject("Scripting.FileSystemObject")
Set MyFolder = MyFileSystem.GetFolder(".")
Set MyFileCollection = MyFolder.Files
x = 1
Set JadFile = MyFolder.createtextfile("application.jad", true)
JadFile.WriteLine("MIDlet-Name: ")
JadFile.WriteLine("MIDlet-Version: ")
JadFile.WriteLine("MIDlet-Description: ")
JadFile.WriteLine("MIDlet-Vendor: ")
For Each MyFile in MyFileCollection
if MyFile.Type = "COD File" then
msg = "RIM-COD-URL-" & x & ": " & MyFile.name
JadFile.WriteLine(msg)
msg = "RIM-COD-Size-" & x & ": " & MyFile.size
JadFile.WriteLine(msg)
x = x + 1
end if
Next
JadFile.Close
Once you've run the script, fill in the remaining header info (name, vendor, version) and copy the jad and cod files to your SD card. Now you can install the application by simply navigating to the application.jad file and opening it.