Linked by Eugenia Loli on Wed 23rd Jan 2008 22:05 UTC, submitted by koki
Thread beginning with comment 297582
To view parent comment, click here.
To read all comments associated with this story, please click here.
To view parent comment, click here.
To read all comments associated with this story, please click here.
So long as the programmer doesn't make any stupid assumptions there's no reason a Java application shouldn't run on any platform for which there exists a compatible JVM.
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?
Considering apps written for Haiku are written for Java *Standard Edition*, there really isn't much question about whether they will run. They will. And if you didn't check for endianness in your program, that's your fault, not Java's.
@abraxas: Stop spreading FUD.
Edited 2008-01-24 18:56 UTC




Member since:
2005-07-07
This hasn't been true for quite some time now. So long as the programmer doesn't make any stupid assumptions there's no reason a Java application shouldn't run on any platform for which there exists a compatible JVM.
Yes, you do need a JDK, but that JDK can be on any platform. You don't need a Haiku JDK to write Java applications for Haiku.
Edited 2008-01-24 15:29 UTC