This page describes my attempts to run/build things like midp.exe and kvm.exe. Those are from midp2.0fcs and j2me_cldc-1_1-fcs-src-winunix respectively. midp.exe is basically a J2ME emulator that can run midlets just like phones running Series 40 and similar do. I haven't yet figured out what exactly is kvm.exe :P It doesn't launch a GUI the way midp.exe does, and I haven't succeeded to load any midlets into it yet.
However, I managed to build kvm.exe using both cygwin and msvc6. It required installing cygwin along with its make and cmp (difutils) tools (just to make sure I also installed the gcc stuff), and Java Development Kit. Then I added JDK/s and cygwin's bin folders to system
PATH
variable the way it's commanded in the docs. To make the build working though, I also had to trick the system to use msvc's link tool by renaming its equivalent in cygwin/bin, link.exe, to link_cyg.exe (a hack that worked so whatever). Lastly, since I installed a later version of JDK, I had to replace JAVAC = javac
with JAVAC = javac -source 1.3
in makefiles in D:\kvm\tools\jccand D:\kvm\api
Note: after unzipping the midp and cldc packages to the root dir of my D drive, I renamed them to be midp and kvm, I pasted entire paths above for simplicity.
For cygwin, I run "command prompt from here" in D:\kvm\build\win32 dir and use the command:
make clean all
The executional is created in D:\kvm\kvm\VmWin\build dir if you're building with cygwin, and in D:\kvm\kvm\VmWin\build\Debug if you're building with msvc.
To build midp.exe, I added an
ALT_BOOTDIR
variable to system vars with the value of my JDK folder (inside quotes, or the path slashes will be killed by jcc). Line 159 of D:\midp\build\share\makefiles\Defs.gmk should be replaced with JAVAC = $(BOOTDIR)/bin/javac$(EXE) -source 1.3
. You also need zip and unzip tools installed for cygwin. After building most of the files, the cp tool will fail to copy gifs from D:\midp2.0fcs\src\example\icons, since there're only pngs there. Remove line 354 from D:\midp2.0fcs\build\share\makefiles\Example.gmk.
Note: if one is compiling midp against cldc 1.1 (the intended version is cldc 1.0.4, but it's missing float functions used by many games), it's gonna have compilation errors with com.sun.cldc.io.GeneralBase.