This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
developing for cellphones and PDA with GCJ and GIJ
- From: Natale Vinto <ebballon at interfree dot it>
- To: java at gcc dot gnu dot org
- Date: Thu, 23 Nov 2006 21:50:31 +0100
- Subject: developing for cellphones and PDA with GCJ and GIJ
Hi all,
I was looking for a way to yse GCJ also for mobile developing with Java and
then I've done some try that I would report hoping could be useful.
I tried to use develop for cellphones using J2ME framework (java 2
microedition) from Sun with GCJ. Compiling it's ok, the
gcj -C --classpath .:(J2ME JARS) Sources.java sources1.java etc
make a good .class file (for JDK -target or -source is preferred) but ,
because the J2ME developing process is:
-compiling OK
-preverifying NO
-testing on Desktop ?OK
the preverify is not supported cause there is Sun binary tool, preverify, that
preverify and prepare classes to be ready for run.
The testing could be done with an opensource sourceforge project
microemulator.sf.net ,is a J2ME apps emulator and it is realeased in SWT too,
so it could be used compiling it or using GIJ.
About PDA I found it working with the SuperWaba framework
(www.superwaba.com.br), that is a VM for WinCE,PalmOS and SymbianOS 7.0 .
The superwaba developing process is:
-compiling OK
-making SuperWaba compatile binaries ?OK
-testing on Desktop OK
the compiling could be easily done with GCJ , for example
gcj --classpath .:$SUPERWABA_ROOT:/lib/SuperWabaTools.jar:
$SUPERWABA_ROOT/lib/SuperWaba.jar -C Source.java
where $SUPERWABA_ROOT is the dir where SuperWaba is installed
This make a .class compatible where JDK 1.5 faults cause the javac -target 1.1
is not possible with the 1.5 version.
The to make SW binaries(PDB , PRC, EXE, CAB) are used some JARs from SuperWaba
framework, so they can be created in this way for example
java -classpath
$SUPERWABA_ROOT/lib/SuperWabaTools.jar -Dsdk.root="$SUPERWABA_ROOT"
superwaba.tools.Warp c ClassName
java -classpath $SUPERWABA_ROOT/lib/SuperWabaTools.jar:
$SUPERWABA_ROOT/lib/SuperWaba.jar -Dsdk.root="$SUPERWABA_ROOT"
superwaba.tools.Exegen /m /v 1.0 /t ClassName /p ClassName /e ClassName
this make PDB,PRC(palm os binary) and EXE(wince binary)
I tried to use GIJ for this but I've got some errors..anyway GIJ could be used
for testing on Desktop superwaba application as applet. In fact for example
gij --classpath .:$SUPERWABA_ROOT/lib/SuperWaba.jar waba.applet.Applet /w
240 /h 291 /uiStyle WinCE /bpp 8 /scale 1 ClassName
this emulate a WinCE/Pocket PC device on Desktop with the application compiled
before with GCJ.
This is my experience with mobile developing with GCJ, I know isn't much but I
hope could be useful to you too.
Regards
--
Natale Vinto @ Blues-Man
http://www.gotext.org