[MUD-Dev] Why not compile java into object code?

Nathan F Yospe yospe at hawaii.edu
Thu Feb 26 22:21:52 CET 1998


On Thu, 26 Feb 1998, Caliban Tiresias Darklock wrote:

:On 08:18 PM 2/26/98 +0000, I personally witnessed Ben Greear jumping up to
:say:

:>What would it take to compile java down into object code (.o files)?

:A complete perversion of everything Java stands for. The whole idea is
:'write once, run everywhere'. If you want object code, use C++.

And on another note, it is being done. I've seen a sun bytecode-to-sparc
compiler (never made it out of beta, that I know of), bytecode to MacOS,
bytecode to BeOS...

:>It's not being done...but I wonder why?  I don't care if I have to compile
:>for each platform...if I compile just for win95 80% of my users will enjoy
:>a tremendous speedup....

:Use Microsoft J++. It generates much faster bytecode, which is
:unfortunately not always compatible with JVMs from other vendors, but who
:cares? Everyone's using Microsoft anyway, right? What difference does it
:make if some of the people who would normally be able to run it can't?
:Well, to hear Sun's side of it, the entire POINT of Java is compatibility
:and if you design an incompatible Java compiler then you're not really
:doing Java. I tend to agree.

This is post-distribution one-time optimization. Completely different case.

<rant snipped> This is a language war - not good.

:>On a similar level, is this what JIT compilers do?  

:Nope. JIT compilers take actual Java source and make it into bytecode. In
:other words, you don't have to compile your Java if you use a JIT compiler,
:because the JIT compiler does it for you. Excellent during development. Not
:so excellent in distribution.

Wrong. JITs optimize sequences of bytecode during runtime, and cache them.
I'm not sure _what_ you are thinking of, but it isn't a Java JIT. The idea
of optimizing and caching sequences is a good one for bytecode based muds as
well.

:>If so, could not
:>someone write a JIT that produces an ordinary exe?

:It occurs to me that it may very well be forbidden under Sun's license
:agreement to create a native-code compiler for Java. Bytecode is pretty
:much an integral part of what Java is, after all.

Sun has done this themselves, and there is no prohibition in the licence that
I can recall.
--

Nathan F. Yospe - Aimed High, Crashed Hard, In the Hanger, Back Flying Soon
Jr Software Engineer, Textron Systems Division (On loan to Rocketdyne Tech)
(Temporarily on Hold) Student, University of Hawaii at Manoa, Physics Dept.
yospe#hawaii.edu nyospe#premier.mhpcc.af.mil http://www2.hawaii.edu/~yospe/





More information about the mud-dev-archive mailing list