Re: How Sun makes money from Java since it develops it and gives to everybody for free?
- From: "Chris Uppal" <chris.uppal@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 10 Mar 2007 04:06:53 -0000
John T wrote:
[...] if Eclipse uses its own
compiler, which obviously it does, how can we be guaranteed that if a
program is written for JDK1.6 and Eclipse compiles it sucessfully that
it would run from the command line just using the proper CLASSPATH
variable with a java my_program command?
There is always a possibility of bugs, of course, but the chance of that
causing serious problems should be fairly slim. There are several reasons...
One is that what we call the Java "compiler" is actually a /translator/ -- it
converts from one high-level, OO, language (called "Java") to another, very
similar, high-level, OO, language (called "JVM bytecode"). Those two languages
are both pretty well specified, and the mapping between them is also fairly
well tied down by the specs, so there isn't that much room for interpretation.
And, since they are so /very/ similar, there isn't a lot of room for error
either. (BTW, when I say, "very similar" I mean more similar than C and Pascal
are to each other, for instance). The Java spec has become pretty complicated
over the years, but most of the bugs in javac or Eclipse seem to be (and have
been) in the type-checking parts (which are the most complicated), and errors
there don't usually have any effect at runtime. That's to say: the JDK
compiler and the Eclipse compiler might disagree on whether some code was legal
at all, but if they both were willing to compile it then they would probably
produce equivalent results.
Secondly, the Eclipse people have quite a lot of time to study upcoming Sun
releases and (presumably) plenty of opportunity to talk to the people at Sum.
And vice versa. So there should be a fair degree of agreement between the two
teams -- remember, they are not in competition with each other.
Lastly, since Eclipse uses Sun's (or whoever's) JVM as the runtime for the code
you create and test, it doesn't really matter very much if they differ. You
will, presumably, test your code on the kind(s) of JVM that your users will
have, or onto which you will deploy your webservers. So, provided the tests
work, you have a reasonable assurance of safety. Of course, if you expect to
be shipping your code to run on a variety of different JVMs then you should
expand your testing program -- but there's nothing new about that... You
aren't going to be shipping Java source to your customers (usually) so it
doesn't matter whether the bytecode you ship depends in some obscure way on the
compiler you use to generate it -- what matters is whether that bytecode will
run the same on the customers' JVMs as it does in your testing environment.
-- chris
.
- References:
- How Sun makes money from Java since it develops it and gives to everybody for free?
- From: www
- Re: How Sun makes money from Java since it develops it and gives to everybody for free?
- From: Skip Hollowell
- Re: How Sun makes money from Java since it develops it and gives to everybody for free?
- From: www
- Re: How Sun makes money from Java since it develops it and gives to everybody for free?
- From: RedGrittyBrick
- Re: How Sun makes money from Java since it develops it and gives to everybody for free?
- From: Skip Hollowell
- Re: How Sun makes money from Java since it develops it and gives to everybody for free?
- From: RedGrittyBrick
- Re: How Sun makes money from Java since it develops it and gives to everybody for free?
- From: Oliver Wong
- Re: How Sun makes money from Java since it develops it and gives to everybody for free?
- From: Lew
- Re: How Sun makes money from Java since it develops it and gives to everybody for free?
- From: John T
- How Sun makes money from Java since it develops it and gives to everybody for free?
- Prev by Date: Re: How to make the program can accept plugins to extend its functionalities?
- Next by Date: Re: Java 1.6 becoming idiot-proof or just slack?
- Previous by thread: Re: How Sun makes money from Java since it develops it and gives to everybody for free?
- Next by thread: Re: How Sun makes money from Java since it develops it and gives to everybody for free?
- Index(es):
Relevant Pages
|