To read all comments associated with this story, please click here.
sun have a jvm for a lot of embedded system
also it's not the sun's job to create a jvm for all cpu...
sun provide an implementation... people can create a jvm if they want...
a lot of embdedded system use java to program... like muvium (www.muvium.com)... this system cpu is under 50Mhz...
don't forget java is a language...
if you find the jvm implementation you use, try to use another one... or try compagny who take the java code and convert it directly in c or asm...
you can try gcj... but for the majority of the test i done, it's slower than sun jvm
I think it was Apple's choice not to have Java 1.6. Not Sun. Sun doesnt make a Java VM for Apple (or many other platforms). I think they support Linux/Windows and Solaris. From what i understand its up to Apple to develop and deploy Java on the Mac OS X platform.
Also, I am not sure what embedded system you are working with, but the J2ME works on lots of devices with as little as 5MB of RAM (some i suspect even less). If you are having to deal with JNI, it sounds like you are probably dealing with hardware that has no java library support. Thats not Java's Fault either (its like blaming language X for not having libraries for hardware Y, so you have to use an external interface to libraries written in language Z).
Java does not equal C. If you want C portability, use C. If you want Java's features, use Java. Or if you want the best of both worlds and your platform supports GNU GCC use Their GCJ compiler, and compile to native code and link to C/C++ libraries as needed. There are also more efficient VMs such as Kaffe.
BTW- i suggest if you are having problems with eclipse, use NetBeans. I have started using it for ruby development and its very nice.
Java 6 GM has been available for Tiger since late 2007, hasn't it?
They even mention it in this support note: http://docs.info.apple.com/article.html?artnum=307177
I'm not even sure that Apple have updated Java 5 for Leopard with the latest fixes but it's been a long time since I loaded Java 6 onto my Ubuntu and Windows machines.
For a company that said that Mac OS X was the best platform ever for Java, it's time for them to eat their words.





Member since:
2007-04-17
I'm currently working on a Java project on an embedded system. A bit annoyed by all the legacy code I have to work with, I'll start a small rant against Java to fight my boredom.
The news kinda reveals my biggest gripe against Java. For me it is not portable at all; at least, no more than other languages.
Most platforms feature at least a free decent C compiler. From there either you directly have a modern C++ compiler or you can compile a C++ compiler (i.e. GCC). Even on the embedded systems, it is quite rare not to be able to get a decent C++ compiler (although a lot of programmers in the embedded market tend to dismiss it, 'cause someone told them embedded programming had to be done in C).
Now, with Java, you're at the mercy of having a decent JVM for the relevant platforms. Of course, major platforms have access to a decent Java 6 VM, but it's far from being the case on more exotic platforms. Mind the news above: MacOS X had to wait a year to have access to Java 6, and it's only covering the latest 64 bits Intel CPUs! Personally, I don't think that MacOS X is such an exotic platform.
A lot of "exotic" platforms do have a JVM, but usually it's a decent Java 1.2 VM at best, or a quite slow and incomplete Java 1.1 VM at worst. Some programmers are happy with that, I'm not.
In the project I'm working on, they use JNI to interface the Java part with a C++ library doing the core work. While it makes sense from a technical point (the core part needs to be as fast and efficient, the target being an embedded system), it makes things even worse.
Not even talking about the 64 MB eaten up by the JVM (WTF?! 64 MB on an embedded device, just for a GUI ?!). The addition of a C++ library, combining Java and C++ portability shortcomings together, makes the portability of the whole project a nightmare.
I could also go on about all these Java development tools that, as if they were the only relevant Java application, install development tools or libraries that are incompatible with the rest of the system (Eclipse anyone ?)
A bored and annoyed developper.
PS. Yesterday, Eclipse (lastest stable version) crashed about 10 times the Sun JVM (also latest stable version) with some nice segfault. Although I recall someone telling me that segfaults were impossible in Java, I most certainly encountered way more Sun JVM crashes than I found critical bugs in C++ compilers (GCC and VS).