Linked by Eugenia Loli on Wed 23rd Jan 2008 22:05 UTC, submitted by koki

Permalink for comment 297592
To read all comments associated with this story, please click here.
To read all comments associated with this story, please click here.
Member since:
2005-08-21
Well... I could make the same claim about <insert your favourite compiled language>. However, when people say "Java" they can mean one of the following:
1. Java the programming language.
2. Java the standard library.
3. Java the virtual machine.
4. Java the compiler (yes, I've met people who use this terminology).
Personally, Java the programming language could use a few constructs from Scheme, but that's beside the point. Let's assume we have programming language X that also had a huge, portable library with a GUI, supports network programming, text parsing, and the kitchen sink that assumed little about the target architecture (*ahem* http://cpan.org *ahem*). What are the portability issues left, if we look at the language itself?
- If it allows direct manipulation of bits, there's always the endianness to consider.
- Hmm... anything else?
The compiler, whether it is targeted to a virtual machine or the actual machine, takes care of the rest.
In order to port Java the virtual machine, you don't need to do that much. It's not a huge program. Why do you think it takes so long to port "Java", then? Because the standard library is not really portable: it doesn't compile as is on an arbitrary new target platform after you've ported the virtual machine and the compiler (which should be all that is needed).
Coming back to the point, what you say is partially true: the *language* is portable, in the sense that as long as you don't use the standard library, the built-in features should work on any compatible JVM. Well, almost... Ever heard of J2ME?