Gosling: Java is like oxygen

The creator of Java is confident the programming language he conceived a decade ago has a long way to go yet before it runs out of steam.

newsmaker James Gosling's mantra to Java developers has stayed the same since he created the programming language a decade ago--write an application once and port it across multiple platforms with no worries.

Since its inception in March 1995, Java has grown to become a tool that some developers swear by, using it to run a gamut of devices ranging from mobile phones to financial systems.

The Java economy comprises 4.5 million developers, one billion Java cards, 700 million PCs shipped with Java, and 708 million Java-powered phones. The power and ubiquity of Java remains unchallenged, even with the rising popularity of scripting languages such as PHP, which Gosling describes as a "narrow solution".

Speaking on the sidelines of a Sun Microsystems developer conference in Bangkok last month, Gosling spoke to ZDNet Asia on the future of Java, where it stands among competitors and its open-source prospects.

Q: Most people take the portability of Java for granted. Will that cause the language to be overshadowed by the next big thing?
A: Well, there better be something that's better than Java some day, otherwise it says something about the evolution of the human species. If there's never going to be a better programming language then we're probably dead. But it feels like Java still has a long way to go before it runs out of steam.

So far, [Flash] hasn't had a huge impact on Java.

It's interesting how people involved in enterprise software take Java as an assumed thing. Java is sort of like oxygen in the air--nobody thinks about the oxygen when they're breathing. Although there are special purpose programming in new domains, Java seems to be living pretty long.

What is one thing that you want Java to fix in future?
When I look at systems like the audio visual set-up in my house, a lot of those are completely brain-dead. They are mostly a combination of different standards and software--brought about by a movie and recording industry that's goofy.

[? $GLOBALS[POLL_ID] = 20003484; template("/zd/common/poll/index.htm");?]

Someday that will get fixed.

What do you think of Macromedia wanting a slice of the Java mobile market?
Macromedia's Flash format is good for doing flashy graphics, but not for sophisticated applications. From what I see, Flash takes quite a beefy machine to run, because it's very graphic intensive. So far, it hasn't had a huge impact on Java.

But Java isn't as good as SWF (ShockWave Flash) in snazzy graphics used in mobile games, is it?
There are various libraries that you can use to do all that [graphical] rendering in Java. It's more a matter of [programming] tools that aren't centered on creating those graphics. A lot of Java tools are more about doing business logic and interacting with databases.

But these days, the interesting games on cellphones are in 3D. It's amazing how many cellphones today have 3D accelerators. There are Java standards that let you do 3D in cellphones, but Flash just doesn't let you do that at all.

Netscape's co-founder Marc Andreessen predicted that PHP's simplicity would make it more popular than Java as a development platform for Web applications. What are your thoughts on this, and how can you make Java simpler?
PHP is pretty simple if you do small Web applications, and that's fine. But it doesn't scale up well, such as [developing for] huge financial systems.

I actually think they are looking at the problem backwards. PHP makes generating HTML pages easier, and that's such a small slice of the computing universe. You are boxed into that one piece--it doesn't interact very well with any part of the universe. It's a really narrow solution.

I think the way to make Web site development easy is with the tools. If you want to make a really easy Web site, try Java Studio Creator 2 which gives you a great graphical user interface so you can drag-and-drop components and wire things together. It's much more intuitive than any programming language because there is no programming involved.

Competing with Microsoft is always hard. They have more money than God, and the amount they spend on marketing is 100 times what we can spend.

Under the sheets, when you create an application with Java Studio Creator 2, the application will scale up hugely. You can deploy it on a giant, managed cluster with all kinds of sophisticated enterprise-class facilities that are just not available in the PHP world.

Ovum has said the world revolves around the two ecosystems of Visual Studio and Eclipse. Where do Sun's tools fit in?
I think they [at Ovum] are full of crap. You know, the adoption numbers for Netbeans have been really tremendous.

We haven't caught up with Eclipse, but we are getting close, and I'm extremely happy with that. When it comes to high-end sophisticated apps, we're better than Visual Studio.

The interesting competition for us is around the developer who wants to put something together easily--people who are domain experts rather than software experts. We put a lot of effort into addressing that.

Our answer to the PHP crowd is that you're barking up the wrong tree. You want to make development easy? That's what the tools are for.

A developer told me that Longhorn, Avalon, Indigo and the new .NET 2.0 framework are far ahead in the development space. Do you agree?
No, that sounds like a Microsoft marketing white paper than anything else.

But two years ago, you said competing with C# and .NET is a day-to-day struggle.
Competing with Microsoft is always hard. They have more money than God, and the amount they spend on marketing is 100 times what we can spend. We depend a lot on word of mouth and the community.

It doesn't matter what Microsoft is doing. It's always a struggle to compete with them because no matter how much better you are, they can outspend you by a factor of a hundred. They can make anything sound good. If you buy people enough buckets of free M&Ms, they'll believe anything.

What are your thoughts on Microsoft's idea of interoperability? They seem to be coming to terms with it when they started an open source lab to try and see how Windows can work with open-source software.
They are trying to figure out how to compete against open source. It's not like they are trying to help the open-source world. It's their way of admitting they've got a problem.

They are so strange with open standards. On one hand, they go XML (Extensible Markup Language) and Web services--which they do quite an okay version of. But here's an example of how Microsoft goes screwy: the W3C (World Wide Web Consortium) has a binary standard for doing XML binary encodings. If you want to get performance from XML, you have to use binary encodings rather than ASCII encodings. Microsoft doesn't support that W3C standard--they invent their own binary encoding, which is a proprietary secret.

You've said Java is inherently more secure than unmanaged codes in languages like C. What's in your mind whenever you hear of a Java security loophole?
People have found an occasional number of bugs which are really exotic. There was a vulnerability in the Java Virtual Machine for Symbian cellphones. The person who discovered it was able to break into his cellphone, and he got world famous. But he never managed to break into any body else's cellphone.

Although there are some bugs which have security implications, we fix them very quickly. The fundamental Java platform is hugely robust and nobody has ever seen an exploit in the wild. And nobody has ever broken into a [Java-based] banking system.

On application servers, Ovum has indicated that Sun is behind BEA, Jboss, IBM and Oracle. Though Sun's app servers are open-source, they say Sun never had more than 10 percent of that market. Any thoughts?
Those numbers are somewhat accurate, but it depends on what you're measuring. We have three app servers, but one of the little-known truths is we've contributed heavily to the Apache Foundation. A lot of the Apache engineering around the Tomcat Java servlet engine was done fairly largely by Sun engineers. While Tomcat is absolutely the number one app server engine out there, it never gets counted in any statistics because it's not a commercial product.

It’s known that Sun will eventually make all its products open-source. How far are we away from an open-source Java?
Well, it depends on what you mean by open-source. It’s been pretty much open-source for the past decade. Pretty much anybody can look at the source codes.

What about releasing Java under a General Public License (GPL)?
Almost all our customers will abandon us if we put a GPL license on it.

We run Java essentially as an open-source project with a license that requires compatibility testing. The GPL license is this contagious thing that says if you use this GPL software, then you must make your own software under a GPL license. Most people will object to being required to "GPL" their codes.

When we talk to organizations that use Java, one of the things they really care about is interoperability and compatibility through testing. If we get rid of testing under a GPL license, a whole lot of people will get really nervous. The GPL crowd is loud, but we tend to pay attention to customers rather than Slashdot flamers.

But let's say there is an open-source, freely reusable and portable version of Java that conforms to what Sun sets out as compatible, what would that mean to Sun's Java licensing business?
Probably not much. A majority of our Java licensing business is from cellphones and smart cards. And nobody is doing an open-source version of any of those.

The Harmony guys are open sourcing stuff that's already open source anyhow. The Harmony crowd is mostly Intel and IBM--just ask them what their logo is.