
ええかんじー

ええかんじー
Java 2 Platform, Micro Edition CDC Personal Basis Profile (PBP)
前回の Personal Profile に続き Personal Basis Profile のメモ。
Fedora Core 2 と J2SE 1.4.2_08 にて。
Download:
- J2ME Personal Basis Profile Version 1.0
- Modified Microwindows Source Code
/usr/local に microwin-sun-11_jun_2002.tar.gz を展開しておく。
$ unzip j2me_pb-1_0-fcs-src-b45-linux-i686-15_jul_2002.zip
$ cd basis
$ chmod 644 src/share/javavm/runtime/globals.c
$ vi src/share/javavm/runtime/globals.c
117c117,118
< #define CVM_SYSMUTEX_ENTRY(mutex, name) {&CVMglobals.##mutex, name}
---
> #define HACK_PREPR(mutex) mutex
> #define CVM_SYSMUTEX_ENTRY(mutex, name) {&CVMglobals.HACK_PREPR(mutex), name}
$ chmod 644 src/linux/native/java/lang/UNIXProcess_md.c
$ vi src/linux/native/java/lang/UNIXProcess_md.c
34c34,53
< extern pid_t __libc_wait(int *status);
---
>
> /* following lines Hacked by Kent Hulick based on
> * ftp://people.redhat.com/drepper/libcwait.c
> * fixes a broken calls to a removed glibc function:*/
> #include <errno.h>
> #include <sys/syscall.h>
> pid_t __libc_wait (int *status)
> {
> int res;
> asm volatile ("pushl %%ebx\n\t"
> "movl %2, %%ebx\n\t"
> "movl %1, %%eax\n\t"
> "int $0x80\n\t"
> "popl %%ebx"
> : "=a" (res)
> : "i" (__NR_wait4), "0" (WAIT_ANY), "c" (status), "d" (0),
> "S" (0));
> return res;
> }
>
$ cd build/linux-i686
$ make J2ME_CLASSLIB=basis JDK_HOME=/usr/local/java CVM_GNU_TOOLS_PATH=/usr/bin
$ cd bin
$ ./cvm -Djava.class.path=../testclasses.zip HelloWorld
Hello world.
References:
- http://developers.sun.com/techtopics/mobility/configurations/articles/cdc/
- http://forum.java.sun.com/thread.jspa?messageID=3528322�
- http://www.moriwaki.net/wiki/index.php?%5B%5BJ2ME_CDC%5D%5D
Java 2 Platform, Micro Edition CDC Personal Profile
Fedora Core 2 と J2SE 1.4.2_08 にてのメモ。
make で ksh がいるとか言われたのでそれもインストール。
Download: J2ME Personal Profile Version 1.0
$ unzip j2me_pp-1_0-src-linux-i686.zip
$ cd personal
$ chmod 644 src/share/javavm/runtime/globals.c
$ vi src/share/javavm/runtime/globals.c
117c117,118
< #define CVM_SYSMUTEX_ENTRY(mutex, name) {&CVMglobals.##mutex, name}
---
> #define HACK_PREPR(mutex) mutex
> #define CVM_SYSMUTEX_ENTRY(mutex, name) {&CVMglobals.HACK_PREPR(mutex), name}
$ chmod 644 src/linux/native/java/lang/UNIXProcess_md.c
$ vi src/linux/native/java/lang/UNIXProcess_md.c
34c34,53
< extern pid_t __libc_wait(int *status);
---
>
> /* following lines Hacked by Kent Hulick based on
> * ftp://people.redhat.com/drepper/libcwait.c
> * fixes a broken calls to a removed glibc function:*/
> #include <errno.h>
> #include <sys/syscall.h>
> pid_t __libc_wait (int *status)
> {
> int res;
> asm volatile ("pushl %%ebx\n\t"
> "movl %2, %%ebx\n\t"
> "movl %1, %%eax\n\t"
> "int $0x80\n\t"
> "popl %%ebx"
> : "=a" (res)
> : "i" (__NR_wait4), "0" (WAIT_ANY), "c" (status), "d" (0),
> "S" (0));
> return res;
> }
>
$ cd build/linux-i686
$ make J2ME_CLASSLIB=personal JDK_HOME=/usr/local/java CVM_GNU_TOOLS_PATH=/usr/bin
$ cd bin
$ ./cvm -Djava.class.path=../testclasses.zip HelloWorld
Hello world.
References:
- http://developers.sun.com/techtopics/mobility/configurations/articles/cdc/
- http://forum.java.sun.com/thread.jspa?messageID=3528322�
- http://www.moriwaki.net/wiki/index.php?%5B%5BJ2ME_CDC%5D%5D

フルーチェ作るときに、欲張ってついつい牛乳を入れすぎ、
トロトロになって毎回後悔しながら食べる今日この頃、
引っ越しました。
カーテンまだ買ってないので、うちの中、外から丸見え…