Parkydr
Developing for the GP2X since 2006
bpmurray posted on May 25 2006 at 11:35 AM said:PSyMastR posted on May 24 2006 at 04:00 PM said:Isn't there a program that fully compiles java for arm platforms?
Yes - the GNU toolchain has a Java compiler. However, by doing that, you produce an executable that's platform-specific. The idea of Java is that it's more than just a language: it's a platform, i.e. write once, run anywhere. So when you compile your java app into a jar, that can be executed by any JVM on any platform (at least, that's the theory).
Apropos the performance of Java, it's quite comparable to that of any compiled programs. In fact, the vtable management in Java is generally more efficient than C++. Old version of Java weren't particularly fast, but since 1.2, it's been pretty darn quick indeed. The only inefficiency is the heap usage, but you can optimize that using the commandline settings for your VM.
My experience is "write once, debug every where" especially with GUIs - you can never be sure how they will be set out. I've got Java 1.4 on my old Sun SparcStation 5 and I have never found an app that performs as fast as equivalent C/C++ applications. I can't believe it will be much different on the GP2X.
Related quote
Last edited by a moderator: