

Java Trap, 2010 Edition - pquerna
http://journal.paul.querna.org/articles/2010/10/12/java-trap-2010-edition/

======
hugh4life
I really wish more effort was put into D... I think that's really the best
path to freedom vs Java and .Net... I wish Nokia would would adopt D because
nobody wants to use C++ and Python is slow...

I just saw this on twitter...

<http://twitter.com/casperbang/status/27134952930>

"Java has an official open source reference implementation, but is not free.
C# has only unofficial open source implementations, but is free!"

<http://www2.research.att.com/~bs/bs_faq.html#Java>

"Java isn't platform independent; it is a platform. Like Windows, it is a
proprietary commercial platform. That is, you can write programs for
Windows/Intel or Java/JVM, and in each case you are writing code for a
platform owned by a single corporation and tweaked for the commercial benefit
of that corporation."

~~~
Keyframe
Which D, 1 or 2? I have used D for several years and know a few people that
also used D for a longer period of time. Consensus is that D is dead for all
practical purposes (especially D2).

~~~
MrRage
Could you expand D being practically dead? or link to some sources on that? I
haven't heard such strong statements about D before, and I'm curious to learn
more.

~~~
Keyframe
Pretty much sums it up: <http://h3.gd/devlog/?p=22> D1 and D2 are like
different languages. D1 went to a dead end and D2 got nowhere, it got into a
conundrum feedback loop. It's a bit hard to explain everything in this post
since there is a lot to cover, but most of the community that is years into
this is aware of all of it.

Also, good luck with any kind of support that is not in the interest/hobby of
D developer. I once wrote a fairly large program that was for a commercial
purpose (wrote as an order) - and I got stuck on a fairly large bug in
standard library which I couldn't resolve myself because I have lacked the
expertise to do so, I even think it was not open sourced then also (basically
free() never returned memory to the OS). That bug is still open after several
years. I offered money, anything basically to get this resolved since my
application crashed due to it - if there weren't for helpful Tango guys I
would have to rewrite the damn thing from scratch in another language.

D1/Tango had so much potential, but it got nowhere, unfortunately. I am still
bitter I spent so much time and effort in D at all, just to return to C (and
some C++).

------
devmonk
I think the author is just taking advantage of Java's name having been drug
through the mud by Oracle to push his point-of-view.

Many of Apache's projects are Java-based, and I don't seem them making any
effort to port all of them over into a different language.

Though Oracle stunk up JavaOne this year, and the lawsuit against Google is
making Oracle look like a supreme ass, companies like IBM, RedHat,
SpringSource, and many, many others have a significant investment in Java.

Java has been and will continue to be close to the top of Paul's heap in terms
of jobs for the foreseeable future:

[http://www.indeed.com/jobtrends?q=java%2C+Python%2C+Javascri...](http://www.indeed.com/jobtrends?q=java%2C+Python%2C+Javascript%2C+C%2C+C%2B%2B%2C+PHP&l=)

<http://www.indeed.com/jobs?q=java>

However, I would be the first to say that if you are looking to the future,
explore dynamic and functional programming languages. If I had to pick one
right now, I'd lean toward Ruby, not because it is the most well adopted (and
for goodness sakes, it has had enough time to be), but because the language
itself is great, and it has a growing and thriving community.

But Java is not dead yet, and it is far from a trap.

~~~
mbreese
I don't think that Apache would start porting existing projects, but do you
think that there will be many new ones? Or how many existing projects will
have any significant effort put behind them?

Imagine, if you will, that there were no Apache. What would the Java landscape
look like today? If Java at Apache flounders, the platform as a whole will
also diminish. Java has thrived for so long in a Microsoft dominated world
thanks largely to third-party open source efforts. If a (the?) major
contributor of open source code in Java goes away, which direction do you
think Java will go? "Thriving community" is not how I see this turning out.

~~~
devmonk
"do you think that there will be many new ones?"

Yes, I think there will continue to be some new projects, and other projects
will fall off. Apache isn't the end-all be-all of Java projects, however.

Several of the larger newer projects were under SpringSource's wing, and there
continue to be new projects there. And there's Codehaus. And some Java
projects under GitHub, Java.net, SourceForge, etc. Then there's Groovy,
Grails, and related projects. JRuby (formerly at Sun, now at EngineYard) is
Ruby, but it allows some reuse of other Java projects. Android (like the
author states) is a subset of Java, so all of those Android app projects.
Kindle's KDK is Java. Your cable box may even run on Java.

If you've been only looking at Apache for Java growth, you've been looking in
the wrong place.

"Or how many existing projects will have any significant effort put behind
them?"

The Java projects at Apache have had continued effort put behind them, but
some of the people that would have put effort towards Apache projects have
spread out into some of the places I mentioned.

"If Java at Apache flounders, the platform as a whole will also diminish."

That's BS. If Apache fell on its ass, Java would still survive. See all of the
other projects I mentioned, plus all of the current Java jobs I mentioned.

Where "Java" itself isn't the new hot thing, Java is dominant, and things
using/requiring Java are hot, for example- look at this Google trends of Java
vs. Android to see what I mean:

<http://www.google.com/trends?q=java%2C+android>

~~~
mbreese
For every new JSR, there has been a new Apache project which has been, if not
the de-facto reference implementation, one of the major implementations (for
better or worse). I just don't see this happening in the future. There will
obviously be other organizations that will take up the slack, but I honestly
don't see it working as well as with Apache.

I know all about the new-hotness that are Groovy, JRuby, Closure, Scala, KDK,
Android etc... This isn't a Java-the-language discussion. This is a Java the
platform/JVM discussion. Oracle's actions so far have been pretty chilling for
the entire platform. You can't run any of the above without the JVM, and that
is what Oracle is controlling.

Java will survive for a long time, and I don't think that anyone doubts that.
But for the first time in a long time there is some doubt about whether or not
it is a platform to build future products on.

In my mind, Apache is the canary in the coal mine. It might take a while, but
they will lose their position of dominance over this.

Then again, it's been a ~15 years, isn't the industry ready to promote
something else as the new major language? We've already seen Ruby and Python
strengthen their positions.

~~~
devmonk
Oracle can't and won't kill the platform.

They are certainly doing harm to Java, but Oracle hasn't sued IBM yet over
this and there is quite a bit Oracle would go after if it were truly intent on
killing the JVM:

<http://en.wikipedia.org/wiki/List_of_Java_virtual_machines>

I don't think that anyone is questioning anyone looking into using other
languages. I even suggested Ruby myself.

It might be a dark age for Oracle sponsoring Java Community Process
development, but some of the JSRs have been crap. If development of new JSRs
slows to a crawl, so be it. A wealth of Java, Ruby, Python, etc. projects have
evolved without being attached to a bureaucratic standards committee.

~~~
bad_user
All proprietary Java implementations are licensed, with the deal made behind
closed-doors, especially IBM's.

All open-source Java implementations available (minus OpenJDK) are not
certified, and can be sued for patents infringements (or trademark violations
if they're advertised as being Java implementations).

Oracle just showed they are not shy on using _their property_.

~~~
devmonk
From what I've understood, Sun didn't license _everything_ to IBM (or for that
matter, to others as you stated). Charles Nutter had a great post (and it has
been updated) on the Oracle suit against Google where he talks about some of
the wild claims that Oracle was making:

[http://blog.headius.com/2010/08/my-thoughts-on-oracle-v-
goog...](http://blog.headius.com/2010/08/my-thoughts-on-oracle-v-google.html)

My point is that no rational company would attack its own base. Oracle had
some wild claims. These will be toned down and they will come to an agreement.
Things will move on.

I'm not saying that people shouldn't pay attention to Oracle's antics (even
though I just consider Oracle a whining child at this point), but I think this
whole thing is overblown.

------
sanxiyn
This is not trolling. I honestly ask: why is TCK important? How does it
prevent Apache Harmony from ever shipping a "real release"? After all, before
OpenJDK, GCJ and lots of other free Java implementations released fine without
TCK.

~~~
pilif
the problem is that Sun/Oracles patent license only covers implementations
that passed TCK.

Conversely, by not passing TCK you don't get their patent license. Many of the
patents in question are difficult (if even possible) to work around if you
were to create your alternate implementation.

This means that using any non TCK implementation of Java makes you liable for
patent lawsuits (as seen with the Google case).

~~~
sanxiyn
Ah, so anyone using GCJ in a product could be sued the same way Google was
sued. I didn't know that.

The right conclusion to make seems to be that software patents are bad.

~~~
rbanffy
I believe the GCJ is vulnerable because, like Dalvik, it's not derived from
the OpenJDK.

~~~
hga
Well, not being VM based it should be free of some or all of the patents used
by Oracle in that part of its lawsuit against Dalvik, but that doesn't mean
that it wouldn't be otherwise vulnerable.

~~~
rbanffy
And don't forget OpenJDK derivatives are only patent-proof for patents owned
by Sun at the time of its licensing.

------
rbanffy
Didn't Stallman write an update to his original?

It's really hard to miss, right under the title, in big bold type:

<http://www.gnu.org/philosophy/java-trap.html>

~~~
bobds
I was browsing Wikipedia's list of Java implementations recently, so I was
wondering in what way the Java Trap still exists, as now you can find dozens
of both proprietary and open implementations.

<http://en.wikipedia.org/wiki/List_of_Java_virtual_machines>

~~~
kprobst
The read from the Oracle lawsuit is that using any of those will get you sued.

I've read many arguments about how Dalvik is 'different' and some or all of
these are 'safe' and so on, but the reality is that 'safe' is whatever Oracle
decides it is.

~~~
brown9-2
_The read from the Oracle lawsuit is that using any of those will get you
sued._

Wait - what users of non-Oracle/Sun JVM implementations have been sued by
Oracle?

Oracle sued Google as the maker of a non-licensed (and supposedly copyright
infringing) Java Virtual Machine. To my knowledge, no one has been sued for
merely _using_ a non-Oracle JVM, have they?

~~~
Zev
Lets say you're writing C. You're going along your merry way and all is well.
Except that one day, your code doesn't do what you want it to do. Well, every
day. But, this day is special. Today, your code isn't working because of a
compiler bug, not because of a bug in your code.

Now, you can either ignore the bug, and hope that it gets fixed. You can work
around it. You can use a different C compiler that may not have the bug. Or,
you can fix the bug yourself.

Now, lets say instead of C, you're writing Java. Given the situation that
Oracle seems to be attempting to make, the first situation won't get you sued,
but it will leave you will a bug. The second choice is the best option. But,
the bug still needs to be fixed at some point. The third choice might not be
possible, because Oracle will have sued everyone else who has a JVM
implementation and forced them to stop making an alternative, leaving you with
the buggy Oracle/Sun JVM. And the last choice will get you sued.

And, to be frank, three of these four choices suck, and the remaining one
isn't a joy to work with either.

~~~
rbanffy
OpenJDK is not a dead end - you can extend it and correct any bugs that are a
problem to you.

------
matrix
Let's say we buy into the Java Trap Hypothesis; the question then is: what's
next? What do you choose if you're a corporation with large projects and large
teams of mostly non-rockstar developers. For the sake of the argument let's
assume the JVM is out, and you can't use .Net (e.g. need Linux, or more
flexible licensing, etc). I'm curious what people would choose, if given a
clean slate for this kind of situation.

~~~
jrockway
Haskell. Faster than java, easier than java, safer than java. And it even has
a centralized repository of libraries.

------
16s
I agree with the article and use truly free dev tools whenever possible, but
for some there is no choice because of the platform they have chosen to
target. If you decided to do Android apps, you'll probably use Java for 90%
(or more) of the work.

~~~
mcherm
...and that's exactly the point. Oracle is suing Google, complaining that they
are violating Oracle patents by running Dalvik on Android. Perhaps they'll
win, and every app written in Java for Android will become useless.[1]

[1] - Note: not a realistic possibility. Someone would pay a billion dollar
ransom instead. But the fact that the threat is out there, regardless how how
credible it is, shows the problem.[2]

[2] - Note: the problem in this case is NOT due to non-free implementations:
no one questions whether Dalvik is sufficiently free. The problem in this case
is software patents. The only proper fix for that is to change the law. Please
call your congresscritter.

~~~
bad_user
The other possible fix would be for a Java/Android related alliance to get
formed by companies with relevant patent portfolios and sue the crap out of
Oracle.

~~~
carson
Given their extensive patent portfolio IBM would have had some hope in
fighting a fight like that. I don't know that there are many others that have
an interest and enough to fight with.

~~~
famsam
Unfortunately, IBM has sold out to Oracle. Why is that not surprising?

~~~
hga
I think "sold out" is way too harsh. I suspect ' more like they got tired of
waiting for something that went from "doesn't look like it's going to happen"
(but probably realized only after they'd put a fair amount of work into it)
into "it will be a cold day in hell...".

Sun demanded a mobile usage restriction. Oracle is suing a company that for
technical and no doubt monetary reasons went around this restriction. Oracle
now _can't_ make up with Apache without undercutting their lawsuit, even if
they were so inclined, which strikes me as unlikely.

~~~
aphexairlines
Half (or more?) of Apache's contributors are IBM employees. For example:
<http://harmony.apache.org/contributors.html>

------
doki_pen
Why does anything need to be run the TCK? Why does anything need to use the
name Java? Isn't this more of a people problem then a licence problem? Am I
really to believe that if someone doesn't have access to Oracle's magical
testing kit then it's impossible to make something that runs java source code?
Isn't it more just a corporate perception problem? Who cares?

~~~
wrs
Well, that's what Google thought...after they spend a few million dollars in
attorney's fees, we'll see if they were right.

------
rbranson
I agree with the article, but I'm also starting to not see why Oracle even
cares about Java anymore. There are enough fantastic free / open source
products available that if you told an investor you were starting a company to
build J2EE infrastructure, they'd probably laugh you out of the room. At this
point the only reason to use a commercial J2EE platform is either lock-in
(it'd be too much time to move to open source) or for some corporate reason
(support, big name, impressive, etc). In what other ways can Oracle monetize
the Java platform at this point?

------
JVerstry
De facto, if Oracle/Sun refuses to TCK any independent implementation of Java
SE, while tolerating their implementation under open source license, then
there is ground for anti-trust action.

The argument being that 3rd parties have no means to validate their
implementation. Hence, there is no practical way to implement Java SE
independently.

Considering the dominant position of Oracle/Sun, we can't exclude the
possibility that the European Commission will start a new anti-trust
investigation against Oracle/Sun.

------
nadam
What is not clear in the article is that languages and platforms are almost
completely orthogonal in most cases. If we are speaking about the Java
platform lock-in, languages are irrelevant, because I can use this platform
from multiple languages. Even if I use Python, I can be locked into the Java
platform because I call existing Java classes (using Jython). Also, for
example whether Java the language is good or bad is irrelevant, because I can
use Scala to compile to the Java platform, which is the best programming
language I have ever seen (for my taste at least). I can also choose to target
the .NET platform from Scala.

So Java platform lock-in can be a problem, I understand. But this seems to be
totally orthogonal to the topic of from wich programming languages to which
platforms you can compile. These different issues are somehow mixed in the
article I think.

~~~
jacobolus
The article’s argument is this: If you write your code in Python targeting
Jython and the JVM, and the Java platform becomes unusable, there’s still a
lot of your code that can be easily ported to run in CPython or IronPython or
PyPy or something. If you write your code in Java and the platform becomes
unusable and Oracle decides to squish alternative Java platforms, then you’re
stuffed.

~~~
nadam
Ok, so the problem is that Java the language supports only one target
platform. This is not completely true, I don't know too much about about J#,
but as far as I know using J# basically you can compile your program written
with Java syntax to .NET.

~~~
hga
J# is capped: the last version was shipped in 2007, it is supported by VS 2005
(now superseded by two newer versions) and support will end in 5 years.

~~~
koenigdavidmj
And even that was quite an old version of the language--1.2, I think.

------
jakevoytko
JNI minimizes the Java trap, since your entire program doesn't need to live in
the JVM. Other functionality can be implemented in native code, and it will
work with Java just fine. Oracle does not control native code, so they don't
control what platform you target in the future. JNI is not a panacea - your
code still runs on Oracle's JVM. But it provides an escape route, since pieces
of your application can be ported away from the JVM without requiring an
entire rewrite.

If you've reached this escape point, yes, you're wasting time by porting your
application away from Java. But you knew Java is a closed platform owned by
one company, and you took that risk.

~~~
tomjen3
Even more importantly, you can start the JVM from C code -- indeed 'java' is
nothing more than a simple wrapper around the necesarry DLL calls.

------
flogic
Ok. From my limited understanding of the FAQ. Sun agreed to release the TCKs
without "field of use" restrictions when they entered the community process?
But they failed to meet that obligation with the JavaSE TCK? Isn't there some
legal structure to force Sun/Oracle to meet that obligation?

~~~
hga
With the JavaSE TCK for the Apache Harmony project.

There _may_ be a legal structure to address that, but for anyone who depends
on the good will of Sun, now Oracle, which probably includes IBM, it certainly
wouldn't have been practical.

------
doki_pen
Summary: "I don't agree that users deserve freedom, but if someone takes away
my freedom, then its wrong."

I'd love to hear his reasoning for disagreeing with RMS's ideal of user
freedom.

~~~
adbge
A BSD license gives the user near absolute freedom to do what one wishes with
a piece of source code -- they can sell it, modify and make proprietary,
integrate with existing proprietary licensed projects, etc.

On the other hand, the GPL imposes heavy restrictions on what a user can do
with a software's source code in order to preserve other users' freedoms.

That's the fundamental split in permissive licenses vs copyleft licenses. It
has been argued to death and the author probably (correctly) assumed that most
readers are already familiar with it.

~~~
doki_pen
Once they distribute it, they are not just users anymore. The people who
receive it are the priority with GPL. The major difference with the GPL is
that the user is king.

------
itissid
Was there not news yesterday that IBM and oracle are going to work together on
Open JDK?

------
tickle_me_elmo
At the multinational I work at, we recently upgraded to Java 1.5. By the time
we have to upgrade to Java 1.7, I expect this little storm-in-a-teacup to be
well and truly forgotten.

------
kaffiene
The article is FUD. Java is too important to too many people to not be around
any time soon. Also, there's a GPL'd release and IBM's Java.

