The Future of Java?
Todd AvErth writes "Judge Motz recently ordered Microsoft to distribute Sun's JVM with every Windows product. Salon decided to pipe up about it with an editorial musing about whether or not it's too late. Most of it isn't all that interesting, but some of the comments from Ximian developer, Miguel de Icaza point to the advantage of being able to compile from multiple languages. Anyone know of any projects to compile JVM bytecode from other languages?" Update: 01/23 16:00 GMT by M : Comments were disallowed when this story was originally posted; fixed now. My mistake (although KDE3's stupid mouseover-activates-form-elements user interface, now finally fixed in the latest versions, has to take some blame too).
Ada has a bytecode generator. See here
So does that mean that my forced ada classes in college were useful?
I Think Sun are really a huge problem
I Think Garbage Collections are too much on my mind
I Think dumps have got a lot to do with why the world sucks
But what can you do?
Like a red rain, beating down on me
Like a Linus line, which won't let go of my brain
Like C#'s ass, it is in my head
Blame it on java
Blame it on java
Blame it on java
I Think slows are gonna drive us all crazy
And write once, run anywheres make me feel like a child
I Think crapyness will eventually be the downfall of civilization
But what can you do? I said what can you do?
Like a red rain, beating down on me
Like a Linus line, which won't let go of my brain
Like C#'s ass, it is in my head
Blame it on java
Blame it on java
Blame it on java
Like a red rain, beating down on me
Like C#'s smile, cruel and cold
Like Linus's ass, it is in my head
Blame it on java
Blame it on java
Blame it on java
Maybe they were giving us time to read the links? That would be a shocker for most /.'ers though, reading the story before posting!.
Responses that are sure to follow:
They'll probably be released right around the same time that we're all wearing those Java rings that Chompers McNealy always used to talk about.
I just tried this, but your code was flawed... I optimized it thus:
;)
int j = 1000000;
and it seems to run just as fast under the JVM as the C++ implementation under gcc.
Hmm...
./a.out
./a.out ./a.out: cannot execute [Exec format error]
;p
Ultra 2/2x168MHz:
$ time
100000000
real 0m0.03s
user 0m0.01s
sys 0m0.00s
$ time java Test
100000000
real 0m4.90s
user 0m4.60s
sys 0m0.15s
OS X 2x800MHz:
$ time java Test
100000000
real 0m2.26s
user 0m1.98s
sys 0m0.13s
$ time
-ksh:
real 0m0.01s
user 0m0.00s
sys 0m0.01s
Looks to me like Java wins considering that the C version wouldn't even run.
[For those playing at home: You don't have to "recompile" Java applications when you cross platforms. ]