Industry Leaders Discuss Java Status Quo
prostoalex writes "JavaPro magazine published a wrap-up report on Java discussions at the recent JavaOne. If you missed JavaOne, the video Webcasts of McNealy, Schwartz, Gosling et al. are available from this site. The round table mentioned above gathered people from Sun, Oracle, Borland, Novell, Motorola and others. The discussion topics included: Java vs. NET, integration issues, the impact of open source and top problems that Java is facing today."
Right. I remember downloading the first Java sdk in 1995 from Sun. Then it was so s-l-o-w. And since it hasn't improved. Today if I load a site where the word Java comes up I know it's time for a break...
Java isn't slow; Java is a language. Since when could languages be slow? It is Java vs C# and JVM vs .NET. But even that isn't a good comparison.
Sun JRE is slow. The JVM runs as another layer on top of the OS, so of course it will be slower than if it were native to the OS. All Sun has to do is make a JM (Java Machine) chip that can be put into motherboards to do the processing at the hardware level, not hardware-os-software level. Then M$ will have a problem competing.
At the risk of publishing a 'me too', I agree with the above post. Java is slow if you write a slow program that doesn't respect the platform and language's unique features and quirks, just like any other language (consider the uneven implementations of STL in C++).
Many programs do use Swing and do it with acceptable performance; JBuilder is one example that comes to mind. Writing a responsive Swing app is possible, it just requires knowledge of the UI toolkit and how to appropriately use it... you can write crap code in QT as well. Eclipse is also written in Java; if the backend was written poorly, it wouldn't matter how fast SWT was, but as it stands the user experience is generally quite good.
I would also like to 'me too' the parent's comment about Sun's JVM. The recent changes in JDK1.4 (concurrent garbage collection, etc.) should help somewhat, but JRockit and Jikes show it is possible to write faster JVMs. Sun just hasn't done it yet.
Sun seems good at the theory, but crappy at implementations. The first time I tried NetBeans (a Swing-based app) it was horribly unresponsive and the second time, it had a terrible look and feel... they relied too heavily on JavaBeans and generic layout heuristics so that every dialog was not appropriately laid out or sized.
Anyway my $.02.
======
In X-Windows the client serves YOU!
I will relate to you my experience and the largely subjective reasons I ended up moving towards Java. I am still new at it, and open to other tools- but this is where I am at right now.
/. I wouldn't know what Python is.
I'm not trying to defend my choice but rather- just answering your question by describing what happened to me.
All the code I had written outside the classroom- prior to a couple months ago was written in VB6. That is what I get paid to do. As I've learned more, read more, and dealt with things like MS licensing for a company app that exceeded the cost of the server it ran on by a large margin, I've decided that I want to move to tools that don't leave me depending on MS.
I took a c++ class at a community college- I learned how to write stuff that ran from the command line. It was cool but I wanted to see the kind of progress I had working with VB. Writing GUI based apps in C++ was in a word daunting.
At the same time, working on a project to move a group of people at my company off of windows to linux, I needed to start working with an App written in Java. I found that I could do GUI work that ran on linux and windows with the same code.
Yes it took me a few tries to get things to run on each system. But I only had to figure it out once.
To be frank- and this may get a negative reaction- but if I didn't read
Java is accessible, launches you quickly into results that are enjoyable and runs on both platforms without too much effort.
And once again my disclaimer-- I'm not interested in arguing why Java is or is not better. As someone new looking to move away from something that has grown undesirable- Java has attracted me the most. This article encouraged me - because my one concern was- "will java be around for a while". I think so.
It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
[background: I work in technology for the financial centres in London]
None of these are really technical reasons for Java being good at anything, but the combination allows enterprises to hire people easily, not have to cross-train them, and to get products out the door (usually within their own environment).
None of the places I've consulted at use Java extensively on the desktop. Mostly it's used for back-end work. Front end is Microsoft / web, with a little Swing occasionally.
Java isn't slow; Java is a language.
.NET addresses this by letting you pre-compile CLR code into binaries; that doesn't make the code run faster, but it makes programs start up faster.
No, Java is a platform with multiple implementations of the compiler/JIT and (effectively) a single implementation of the libraries.
Java compilers/JITs achieve very good performance, having little overhead compared to analogous C code.
But the Java platform falls short in several areas.
First, the VM has an enormous memory footprint, and it starts up very slowly. VM sharing is supposed to address this, but it hasn't materialized.
Second, Java's native code interface (JNI) is inefficient and Java cannot efficiently access native data structures. That makes it difficult to reuse existing, mature C/C++ libraries, and to interface efficiently with operating system facilities.
Third, Java's libraries are not designed for speed: their APIs impose a lot of overhead, and the actual implementations aren't very good either. Also, Java's libraries are designed for generality first, and speed and high-quality cross-platform support distant seconds (things like Java2D just don't run very well on all platforms).
Sun JRE is slow. The JVM runs as another layer on top of the OS, so of course it will be slower than if it were native to the OS. All Sun has to do is make a JM (Java Machine) chip that can be put into motherboards to do the processing at the hardware level, not hardware-os-software level.
Raw CPU performance is not the issue. Java code runs very fast in Sun's current implementation. A Java native chip would not help at all (and would be impossible to make succeed in the marketplace anyway). The problems with Sun Java performance are platform design problems. In a sense, Sun's focus on CPU performance has distracted them from addressing the real performance problems.
Java shines in problem domains where you have a long-running service that needs to be secure, robust, scalable, and quickly mutable to changing requirements. If you don't live in that world, your confusion is understandable. Your post is not too different from usenet posts back in the day where Mac/Windows users didn't understand the appeal of unix. From their perspective, nobody used unix and it was extremely unfriendly. What they didn't know was that sometimes large organizations need to create large, custom internal systems that live long and adapt quickly. Java is no panacea there, but it's better than the alternatives.
The "cue the foo posts in 3, 2, 1..." posts will commence with no subsequent foo posts in 3, 2, 1...
That quote does not imply that C# is even starting to catch up with whatever lead Java has in developer base.
I think Java has many flaws and weaknesses, but I also think it has more than delivered on its goal to be the successor to the platforms that preceeded it.
Larry
You just need to do a good bit of planning before implementation.
Windows: MFC front end, C++ back end
Linux: gtk front end, same C++ back end
OS X: obj c front end, same C++ back end
It's more work but every platform has nuances that users like. Unless it's a true native app your users will generally not like it. As my boss says "Make it pretty first, that's what sells. Make it work next." Unbelieveable but true.
Turns out that Java 1.5 will have these features and more - one thing I am really looking forward to is generics.
The final advantage of C# over Java was that a C# program looked like it belongs on Windows - same widget set, same "feel". This is a bigger deal than most people realize. Windows users grow accustomed to doing things a certain way, and they don't like it when you try to impose something different on them. Swing just doesn't cut it in this regard.
- Enterprise Applications - The vast majority of the performance costs of Java occur at start time, when HotSpot is just starting up. Once you get the app up and running (like, for example, on a server), the difference in performace is usually negligable. This is especially true if you are a decent Java developer and understand what Java does well and what it doesn't.
- Embedded devices - There are hundreds of millions of Cell Phones, PDA's, and smartcards out there today that are running Java. Each make and model can have a different processor, memory size, display, etc...but your Java application will run on all of them.
- Web-Deployed applications - The ability to push an application out onto the web via a Java Applet or Webstart application, and have it run on every machine in your company, can save millions of dollars when deploying to a large orginization. Java is able to do this in a way that is reliable and secure.
Are you going to use Java to write a Windows desktop application? Probably not. But how many new Windows desktop apps are there left to write? That's why there are more developers using Java than any other language.Given your antipathy towards Java I take it you tried it once perhaps Loooooong ago, didn't like it, and now spew the same antipathy today as if nothing has changed. Not trying to criticize your view or anything but they "were" valid... years ago.
.so files.
I've used Java from day one, loved it, and use it everyday in my career. It's changed a lot from when it first came out and my love for it has only increased.
People like me, who love Java, tend to do so because
a) We do not have to worry about the underlying OS (mostly) - Great for IT shops supporting many machine architectures.
b) The richness of the standard libraries means programmer's can concentrate on the "business" logic - so again, it's great for IT.
As far as classpath and look and feel goes - neither one is an issue. Simply jar everything you need into one file. Make sure the java runtime is in your bin path and away you go. Even the look and feel can be switched to whatever is appropriate for the OS (Windows, Motif..) quite painlessly. Speed being the thing most people seem to bitch about isn't much of an issue anymore either. And as far as the build environment goes NOTHING beats ANT for shear beauty and ease of use. (And I used to be a make/perl zealot before I was pressured into trying ANT. Never looked back).
So I can't help but feel your views are based upon an impression of the the very early stages of Java when quite frankly it was still learning to walk. And I can't help but notice that your comparisons to C/C++/Python have to be qualified with "depending on" and "as long as".
Now.. if you had instead stated.. Java is ok but JNI sucks rotten clams. I would be more inclined to agree with you. Java really needs a better way to interact with native dll's and shared
(sun won its suit against microsoft that it was unfairly squeezing out the java vm - then promptly sued microsoft for posting the microsoft jvm on windowsupdate.com because the license from sun didn't explicitly allow that. they won the suit and for some time windows users just couldn't get their hands on a vm. and if that doesn't decimate any gains from using java, i don't know what does)
What are you talking about? Windows users have always been able to get their hands on a JVM, just not the Microsoft one because of the lawsuit. Nothing stopping users from downloading one of the many other implementations of the JVM on Windows.
I wear pants.
proof, n. A demonstration that a conclusion is implied by certain premises and axioms.
I'm personally a little tired of the argument that Java is bad because its not open source. While Sun's implementation of the JVM is closed, Java as a language is light years from being a closed source, completely under Sun's control kind of thing.
1) JVM is an open specification (how you implement it and whether that is open or closed is up to you) There are many JDK's/JVM's that you can use to run Java programs other than Sun's (IBM, Kaffe, or whatever the open source one is (and I'm sure there are more than just that, etc)
2) You get the source code for all of the classes/libraries that come with java when you download Sun's JDK. These include the core classes like java.lang.String, etc, etc. The only thing missing, as stated above is the source code for the compiler/interpreter and other tools.
3) There are open source JVM's (i.e. kaffe, etc) although I've found them to be lacking, but they'll get there
So the argument that Sun has control of Java is moot, you can build/run/install and entire Java application without ever touching Sun tools.
Is Java/JVM totally free? Depends who you ask. Its free/open enough for me, personally, but I can see how some open source fanatics can get their panties in a bunch over this.
Also, unlike M$ products, I think the design of Java's classes shows insight, and well thought out design, so in a way I for one am for Sun keeping a bit of control over the language and "core" classes, but thats my opinion of course.
-- A computer without COBOL and Fortran is like a piece of chocolate cake without ketchup and mustard
This doesn't work!
<coder> You need to install the JRE
<customer> What's that?
<coder> It's a runtime environment for bla bla bla
<customer> (eyes glazing over) Yeah, ok, where do I get it?
<coder> Oh, it's easy! Just go to java.sun.com
<customer> That's all? Sweet! Someone showed me yesterday how to type in a URL directly instead of typing it into google... j a v a . s u n . c o m.... uhh... do I need "J2EE", "J2SE", or "J2ME"?
<coder> Oh, no, you want to click on "Java VM" under popular downloads in that little box on the right.
<customer> I thought you said it was a JRE?
<coder> It is... they give it different names to make my life difficult, and your job next to impossible, all in the name of "portable" code.
<customer> (eyes glazing over again) Yeah, ok, whatever. OK, this took me to a new site. I'm not a complete noob, so I clicked on "get it now", and clicked on the Microsoft link, because I run Microsoft on my computer. WHOA! 8MB? I need to spend 20 minutes downloading this pap just to make your program work? And I need to install this on all my computers?
<coder> It's a small price to pay, and besides, it wouldn't take 20 minutes if you'd get a real internet connection.
<customer> Hmmm. Yes. I think I'll go talk to that guy who wanted to sell me the C++ solution. At least I don't have time to grab a cup of coffee while that starts up.
<coder> Really? All my java friends tell me C++ sucks because you have to understand what you're doing. Maybe there's something to it after all...
Another victory for light and truth.
Do you deny that it still takes a shell script to start most Java apps on Unix? The latest Ant apparently still does this, for example.
.NET apps need the .NET runtime. VB apps need that massive dll linked or available on the system... Pretty petty point to base a dislike for a language on. And for IT users.. it's especially moot.
uh... yeah? But even if you do, so what? Last I looked shell scripts weren't that big of a deal. Hell, if you can write the app I'm sure you're more than capable of writing a little itty bitty shell script to launch nicely with your favorite settings and perhaps even change your background to a nice picture of Lucy Liu while you're at. who cares.
Do you deny that developing and building Java apps requires that you adjust you CLASSPATH in order for the compiler to find the locations of third-party libraries you are linking against?
ANT solves this for you during compile time, and runtime really isn't an issue anymore. In fact, if you find yourself setting the classpath in your environment you're probably doing something wrong or using the wrong tools.
Do you deny that running Java applications still requires you to obtain a JRE from Sun? And that many applications require at minimum a certain version of the JRE?
Nothing requires you to use Sun's JRE if that's what you're opposed to. But again, so what? If it's the requirement for a JRE in general you don't like, then again I ask.. so what? Smalltalk apps only run through a Smalltalk interpreter.
People with a background like the one you mentioned have been the source of years of frustration on my part.
Some programmers utterly lack a solid foundation in computer science, and it's these people that cause problems for the rest of us.
By problems I mean things like: sitting down and writing code without actually thinking about the problem, not using a version control system, not documenting, screwing up data structures, misusing a relational database (eg. putting multiple delimited values in a single column), not handling invalid input, trusting what the client sends, fscking with things on a production system, etc.
Apparently people have figured out that a lot of companies are looking for Java developers. They go out, buy a book on Java, write some code and then claim that they are software developers.
Now, that's not too much of a problem in and of itself. The problem occurs when these programmers are included in a team of competent/skilled/experienced programmers. The talented guys then spend a bunch of time cleaning up the mess that the crappy developers create.
Just Say No! to poseur programmers.
Please stop perpetuating the american companies are evil FUD. Most american companies actually care about their customers. Yes, they want to make money but every company needs to to survive. Thats just how the economy works. Most american companies are fairly ethical due to the critical public. You should criticize but don't make pointless generalizations like this. Its really unproductive.
Besides, its not like companies in other countries don't use the same scummy tactics as american companies. But apparently youre too blind to see this. Go get yourself a dose of reality: go try doing business in a third world country. You'll quickly find out that ethics quickly goes out the window due to even less accountability. The little guy gets *royally* screwed by the local warlord/ corrupt politican/dictator.