Originally posted by mrugiero
View Post
IMO, there is no practical difference between native binaries vs some intermediary format with an embeddable VM.
On Windows/Mac/Linux, embedding the JVM on a medium to large app is fine, but for iOS or embedded, the JVM isn't conveniently embeddable. People have done it but it's usually more headache than it's worth. Oracle has plans to fix this but who knows when that will happen.
A second problem is that Java is purposefully designed to restrict interop with non-JVM code. There is JNI which people use to access OpenGL for example, but it's not ideal. The benefit is it insulates devs from some of the low level complexity assocaited with low level code, but it can be limiting if you really want to use a non-Java library.
A third issue is some desirable features like array bounds checking have a small performance cost. Overall, Java's runtime performance is pretty good and the tradeoff vs C is quite reasonable.
A final issue is the Java VM has memory overhead. For medium to large apps or server apps, the VM overhead is insignificant, but if you write a tiny process and want a micro foot print, Java isn't a good choice.
Leave a comment: