Dr. Richard Stallman is talking nonsense; A look into Java Trap

By Angsuman Chakraborty, Gaea News Network
Thursday, May 12, 2005

Dr. Stallman in his article Free but shackled - Java Trap expresses his concern that Java developers may be unknowingly falling into an expensive trap. In his own words:

If you develop a Java program on Sun’s Java platform, you are liable to use Sun-only features without even noticing. By the time you find this out, you may have been using them for months, and redoing the work could take more months. You might say, “It’s too much work to start over.” Then your program will have fallen into the Java Trap; it will be unusable in the Free World.

This is baloney, plain and simple. The statements are wrong on multiple counts.

Richard Stallman> If you develop a Java program on Sun’s Java platform, you are liable to use Sun-only features without even noticing.

Sun-only features are clearly marked and are strongly discouraged to use by Sun. In case you didn’t notice they are also in packages under com.sun.* or sun.* or sunw.* (package name starts with com.sun. or sun. or sunw.). Even extensions to Java, which are not part of the core is identified by placing them under javax hierarchy.
The sun.* packages are not even in the source zip file (src.zip).

Moreover Sun packages are not even documented in the API documentation, making them harder to find, let alone use. In fact they aren’t documented anywhere. To use them you have to actually open the source code in src.zip, where available, and in most cases decompile the class files from rt.jar! And then make sense of them.

There is no way a developer can mistake them for standard Java software/classes. If he is using them then he is making a conscious decision.

Richard Stallman> By the time you find this out, you may have been using them for months, and redoing the work could take more months.

None of Sun-only implementations are frameworks or even serious functionality. They are all low level implementations, which are internally leveraged by the public API. Changing them with alternative implementation could take days at most, definitely not months, even with the worst of developers. Most of the functionality I am aware of are available publicly (alternative implementations) and hence are easy to replace.

At this point I have to ask: Dr. Stallman, have you ever coded in Java? Have you even looked at the API documentation, at the Sun classes before writing this article?

Richard Stallman> Then your program will have fallen into the Java Trap; it will be unusable in the Free World.

There is no Java trap. Java is free for all practical purposes. Dr. Stallman has made a serious error of judgement as described above.

His sun-only library argument is erroneous and highly misleading.

With all due regards, I think Dr. Stallman in his excessive zeal to promote Open Source is falling into a trap himself. I will call it “Open Source Trap”. Anything that doesn’t conform to his narrow world view has to be bad. As Java doesn’t subscribe to his Open Source mantra so, I think, he is on a fault-finding mission. And in this case he makes no sense.

We expect better from you Dr. Stallman, even when you are bent upon promoting your agenda.

Link via The Server Side

Discussion
September 11, 2006: 11:47 pm

[...] Si �a vous int�resse, il y a aussi des avis contraires et aussi le tr�s utile Practical road map to the Free Software and Open Source alternatives que JS a trouv�s pendant qu’on sicutait. Une recherche sur “pi�ge java” ou “java trap” saura vous �clairer encore plus…   [...]

March 6, 2006: 10:13 pm

[...] Java is not free [...]

February 9, 2006: 1:57 am

@belgaonkar
It is already available for download.

February 9, 2006: 1:51 am

[...] The title is inspired by Dr. Richard Stallman’s article - Free But Shackled - The Java Trap. [...]

May 16, 2005: 8:47 pm

I advocate Sun to publish the detail code of sun.* to public , that will solve the problems of Dr Stallman & Co.

May 14, 2005: 2:13 pm

@alex
> Java is so free that you cannot install it on FreeBSD or GNU/Hurd !!

Let me state another:
“Apache is so free that you cannot install it on Minix etc.”

Such arguments do not prove anything. Java is freely available and usable. That doesn’t mean it has to be available for every platform under Sun.

I am aware of Linux developers pain in that Java doesn’t come pre-installed due to a licensing issue. However it is freely dowbnloadable and usable.
What is probably needed is someone hacking a script to download it from Sun automatically :)
But seriously I think Sun needs to handle the Linux issue and change the license accordingly with an exception clause to support pre-installed versions for Linux and clones.

Realize that I am not against a Open Source version of Java. I just think it is too big an effort and can only be reasonably done with an existing almost complete implementation like IBM. You guys should gang up on IBM to makes jikes open source and usable in Apache Harmony.


alex
May 14, 2005: 7:43 am

Java is so free that you cannot install it on FreeBSD or GNU/Hurd !!

May 14, 2005: 6:44 am

@Peter I am all for Open Source Java. However I think it is a huge effort. Hopefully IBM will decide to donate its jikes code to the OSS community.

But I don’t think Dr. Stallman is doing justice to Java and himself by spreading misinformation about the so called “java trap”.

May 14, 2005: 5:37 am

Man I have been using java for 9 years, I want to see more java in Open Office then I can contribute. I left C++ behind 10 years ago and I am not going back.

May 13, 2005: 1:08 am

Open Office and Java - I’m for it

Personally, I am delighted that Open Office is using Java. If you agree, please speak up.


Lambda
May 13, 2005: 1:04 am

Err, Stallman doesn’t care about “Open Source”, he cares about Free Software. If you knew anything about him or the FSF you would understand that very important distinction. Read up yourself, hypocrite.

May 12, 2005: 11:04 pm

@Anjan
> I think Dr. Richard is trying to encourage Harmony from Apache and trying to comibine the open source java guys.

There are better methods to encourage without spreading false propaganda :)

BTW: That’s an interesting one you found. I doubt if it is even used. There is no documentation. Looks like a access modifier defect. It should be a private method.

@Zenil
> Check out the frequently used java.lang.System class.It has several references to sun.* classes.

No it doesn’t. It doesn’t matter how this class is implemented internally. Externally to use it, as per spec, I do not have to use or know about any sun classes. Hope that clarifies. That is the beauty of OOP.

@IM
Yes, it was. And that is why it is so surprising to hear such baseless argument from Dr. Stallman. Java initiative from the very beginning strived not to make available any company specific extensions or functions. It was to preserve the originality of the language they sued against Microsoft. And now they are being baselessly accused of the same :)


IM
May 12, 2005: 9:44 pm

Wasnt this the argument against ‘MS Java’? The addition of MS-only features which while being signposted would nonetheless cause programmers to accidentally write non-portable code.


Zenil
May 12, 2005: 6:47 pm

Check out the frequently used java.lang.System class.It has several references to sun.* classes.

So when Stallman says we are using un-published,un-documented classes like sun.*,what he means is that the java platform and jave library is built upon and uses code that is not free.And when i as a user uses java library classes,i indirectly tag on to these ‘non-free’ dependencies..[Not that i have a problem with it like Mr. Stallman..:)-]..But what he is saying is right..


Anjan Bacchu
May 12, 2005: 4:52 pm

Hi Angsuman,

If you look at
java.awt.BasicStroke -
feedConsumer ( sun.dc.path.PathConsumer, java.awt.geom.PathIterator ), you will see that public method feedConsumer() takes a sun.* Class as argument.

But that is an exception(rare, that too). I think Dr. Richard is trying to encourage Harmony from Apache and trying to comibine the open source java guys.

BR,
~A

May 12, 2005: 3:50 pm

@Jon How is this relevant to the discussion?
In any forums such comments would be marked as troll. You are just using factless provocative statements.


Jon
May 12, 2005: 1:24 pm

Java is not as hot as it used to be. Using Java as a platform for desktop applications is a bit out, MS is taking over this segment with .NET. Java was cool in 2002 when no other supplied such a great library with the programming platform as Java did. Java is dead as a browser plug-in. Java is a bit hot on the cellphone still.

May 12, 2005: 1:14 pm

I would never assume he is clueless. However even the greatest of minds make mistakes. In this case he doesn’t make any sense. He is clearly not into Java.


Tom
May 12, 2005: 9:18 am

Um. I believe he’s referring to the fact that open source implementations are constantly behind Sun for keeping up with java.*, javax.*, and various language features (and it will likely remain this way as far as I can see). Plus all the little nuances that manage to creep in despite valiant attempts at spec writing.

Not to say I agree with all of Stallman’s world view, but you shouldn’t assume he’s clueless just because you disagree over what’s important.

May 12, 2005: 7:07 am

Open Office and Java - I’m for it

Personally, I am delighted that Open Office is using Java. If you agree, please speak up.

YOUR VIEW POINT
NAME : (REQUIRED)
MAIL : (REQUIRED)
will not be displayed
WEBSITE : (OPTIONAL)
YOUR
COMMENT :