Linked by Eugenia Loli on Wed 23rd Jan 2008 22:05 UTC, submitted by koki
Thread beginning with comment 297570
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.
Despite what SUN tells you java is not really "write once, run anywere", it's more like "write once, broken everywhere".
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.
Most large java applications will still have to be ported to Haiku in some fashion. You need a JDK for this.
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
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?





Member since:
2005-07-07
1) Why port a JDK and not just focus on the JRE first? It seems like an unecessary distraction. It's better for end-users to get applications running then to be able to code them.
Despite what SUN tells you java is not really "write once, run anywere", it's more like "write once, broken everywhere". Most large java applications will still have to be ported to Haiku in some fashion. You need a JDK for this.
2) Why 1.4? 1.5 is such a large leap ahead that it seems like they will be missing a lot by not aiming for that. I wouldn't support a Java 1.4 app w/o a large $$$ incentive just for the loss of Generics alone. It seems like the most sensible think would be to port Java 7 so that when the port is done it's update and that they can contribute towards the development of Java 7 itself.
Can you point me to where it says they are aiming for Java 1.4. I don't see that anywhere. As far as I read they are porting OpenJDK which is Java 7.