WinceJava移植

WinceJava移植

Windows CE, I have decided, is worse than Windows, but on a smaller scale. That is because it contains the same amount of *functionality* and horrible APIs, but on a smaller scale. So if we were to consider this a dilution pollution problem, Windows CE is worse than other Windi because of the relative proportions.


This is a story about getting Java to work on Windows CE 3.0. Why Java? The project has to be portable, and on CE, I'm stuck between VC++, VB and Java. Java is the best solution for my problem. Although I do not like VC++, I do like forced garbage collection, but System.gc() will have to do for now. After visiting java.sun.com, I found that there is not a binary distribution of the Windows CE runtime available, which let me down a meandering path, which I will document here. One also should note that I have an x86 laptop which only exists to do development when I need it, so it is a clean Windows 2000 install, less .NET tools.

CLCD 1.1 it is, so I grabbed the source ball.
I downloaded eMbedded VC 4.0 from microsoft, and gave it a go at compiling the KVM. Right out of the tar ball, I got a few compile errors, which were missing dependencies: nativeFunctionTableWin.c ROMjavaWin.c
These files live in the tools/jcc directory, according to the dependency information, so I dove into that directory. In that directory, surprise, is a Makefile.
So I open up the make file and find that I need to generate those files, but it doesn't seem that windows has "make".

Solution: cygwin
In order to get the tools that I need, I download cygwin and installed gcc, make, and some java develop packages just to be safe. I next loaded the cygwin shell and in the tool another look at the Makefile in the tools/jcc directory. I need to build the preverifier first it seems, so off to tools/preverifier/build/win32 and type "make".
New issue, it seems that the Makefile in the "api" directory is incorrect, but that's easy to fix. The "$(PLATFORM)" string in the "PREVERIFY" path is getting lost somewhere because make seems to think that I'm on a unix target, so I'm just going to fudge it and change it to win32. (Makefile) Next issue, I need to have javac accessible from cygwin for javac to work, so I put a javac wrapper in the /bin/ directory.
Now back to the tools/jcc directory to "make windows".

Back out of cygwin
Back into eMbedded VC and voila, the project builds and I have VmWinCE.exe to download.

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值