On what platforms is there no jvm, or a jvm with limited functionality compared to windows or linux

StackOverflow https://stackoverflow.com/questions/4248451

Question

The context of this question is a debate between C and java users. The C user claims that a C backend is more portable than JVM. This is true if we encounter a platform without pre-existing JVM support or relatively weak support. Has anyone on stack overflow encountered such a platform? Could we assemble a list of examples?

Was it helpful?

Solution

Any platform other than x86 and x86_64 tends to have poor JVM support.

OTHER TIPS

I don't understand the "portability" of C in this context. If you mean that you can compile "hello world" for any cpu - then yes C is more portable. But Can you make any portable GUI or network, multithreading etc with C? Yes, U can use QT or some similar. But is it a portability? Java is a platform but C is a language. IMHO it's very different things

Anything running ARM or MIPS is unlikely to have the full JDK available, though it may have access to J2ME.

"More portable" is probably not the best question to ask. What you need to do is identify the platforms that you might reasonably need to support, and find out whether C and/or Java are available for them. If both are available then portability isn't an issue for you. The fact that C is available on more platforms (which it probably is), many of which might be very obscure, is irrelevant.

If this is just an abstract debate then the appropriate answer is "who cares"?

EDIT: In response to comments.

This isn't just about "whipping out a product this week". If you are targeting the desktop then Windows, Mac and Linux cover about 99.999999999% of all installations (give or take a few nines), and all have Java.

If you are targeting mobile devices then you can look up which have Java, but you will still have to do work to port between them and using C isn't going to help you.

Which other platforms were you considering targeting? IBM 370? Dec VAX? OS9? If you can't think of a platform you want to target that isn't one of the above then extra portability is wasting your own time. And remember that all else being equal C development will be slower than Java. If you are going to spend your valuable time writing in C you had better be getting something from it that you are likely to need.

If you are looking to create a 'universal toolkit' that you can use on different projects over the next ten years, then 'one language' isn't going to help. If you are working on a Java project, incorporating C code is complicated enough that it probably isn't going to be worth doing, even if security considerations let you. What you will probably need is a different toolkit for each language you intend to work in - one for Java, one for C etc. The C kit will probably include things like extendable arrays, and other stuff that comes free in Java. Either way: first choose the language for each project, then pull out the appropriate toolkit for that language.

The list of JVM downloads may be found here.

I have no particular expertise in JVM support, but on the surface it looks like Windows, Linux, Solaris, and OS X are all supported. I guess if you are running anything else, then Java is not the way to go...

Here is a pretty comprehensive list of all Operating Systems. I'm sorry to say that there is no JVM for Amiga or ProDOS.

C is only portable if you code it in a portable manner. But word size, library support etc all matter when doing this. You will almost always have to recompile a program for a target platform.

Java was designed to be a portable language; you can take a 32bit program and run under a 64bit VM without change (unless you drop to JNI).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top