The "Return" of Java Discussed 558
An anonymous reader writes "Following on from the marvelous recent James Gosling interview highlighted in Slashdot last week, it would seem that a renewed momentum is building up for his cross-platform creation, if this editorial is anything to go by. It's called 'Java is Back!' But did it ever go anywhere?"
Embedded Java. (Score:4, Interesting)
Java is a nice choice for embedded platforms. It runs several times faster than on PCs (it's native for the hardware, not "emulated" through JRE), the hardware is inexpensive and can perform really sophisticated jobs. I think it may be one of major reasons for Java to take up so much.
Java powered cryptographic iButton [ibutton.com] - a chip the size of your hand watch battery (stainless steel, shock-resistant, water-resistant and several other-resistant "iButton" package) with Java support.
APIs and Libraries (Score:5, Interesting)
Java now has an astounding array of libraries to use these days. Look at for some good ones [java-source.net].
And for anybody who doesn't believe... (Score:3, Interesting)
And anybody who doesn't believe this might want to take a look at why kast wasn't written in Java [sourceforge.net]. People have been telling me that I am the only one experiencing these issues, that I simply don't have enough experience, or that I should take a look at modern JVMs - well, here's one example of people who tried Java and were disappointed. The same happened to many LimeWire users. The list goes on.
Re:There has been some good alternatives (Score:3, Interesting)
There are a lot of pending improvement on Java GUI front, like Eclipse Rich Client Framework using SWT and hopefully it will not be "slow" anymore
Re:And for anybody who doesn't believe... (Score:5, Interesting)
java applications are difficult to install - many users do not already have a copy of the java virtual machine installed on their machine. For these users, installing a java application means downloading and installing the java runtime, which is quite large and can be difficult to configure.
Well, you must be pretty hopeless not to be able to install the Java runtime. Last time I installed it on Windows, it took half a dozen mouse clicks and a couple of minutes tops.
java applications start up slowly - even the smallest java applications can take several seconds to start up, since the virtual machine needs to be loaded first.
I run Java on very low spec embedded PC's, and it's no slouch there. Even if there is a couple of seconds wait at startup, the JIT compiler means a well written app will run without being appreciably slower than a "native" app once the JVM is bootstrapped.
java applications have slow, unresponsive user interfaces--- on slower machines, using java-based user interfaces can be frustrating (resizing the application window can mean taking a coffee break).
That's strange, it must be their inability to code an interface and data models in an efficient manner. I write warehouse control software, where we are dealing with vasts amount of data that must be collated and displayed to the user. Very rarely do we have to resort to doing major grunt work on the server as opposed to doing it in the Java client.
java applications use a lot of memory - on most platforms, the virtual machine itself requires several MiB of memory, even for small applications that use very little memory. For more complicated applications, such as konspire2b, the virtual machine adds a lot of memory overhead. For example, kast currently uses about 1 MiB of memory when it's up and running. konspire 1.0 server (written using java) uses about 12 MiB. The interesting point is that konspire2b is far more complex that konspire 1.0 server (for example, the server portion of konspire 1.0 doesn't even have a user interface).
If this is really an issue for you, then you can tweak the runtimes environment. Yes, Java does requisition a lot of memeory when an untweaked JVM starts up, but the inmpact depends on the machine running the program.
java applications leak memory
This could be rephraed as "bad Java programmers leak memory". I have client-server Java applications that run 24x7 without leaking memory. Perhaps it's because I'm an unsually good Java programmer? Probably not, as I'm just an average one. What I don't do is immediately blame problems on the tools I use until I'm sure it isn't my lack of skill with the tools.
Java 1.5 should help things. (Score:3, Interesting)
Java 1.5 goes a long way to help that, what with iterators, autoboxing and such.
Java keeps quiet (Score:2, Interesting)
I don't do Java, but from what I've seen, it doesn't change much, and where it does, it adds to what was there before. That is IMO a good thing, that developers aren't sitting around poring over documentation, but are productive instead.
(One reason for not doing Java is the small number of companies doing Tomcat hosting).
Re:Return of Java (Score:2, Interesting)
For a long running enterprise application, it would probably be SLOWER in c/c++. No matter how good you are at programming c/c++ you can't anticipate every little bottleneck and write it in perfect assembler... but the hotspot compiler can do that rathar well.
I'll called my platform ".COM" (Score:5, Interesting)
(386 000 000 results)
versus
(1940 000 000 results)
Re:Java is not back. (Score:5, Interesting)
SUN has done an amazing job in extending Java even to include generics without breaking backwards compatability. Yes it did not lead to the solution that is technically and internally the most efficient (it would have required changes to the JVM), but the developer is not affected. Internally it is solved by typecasts, but who cares? The compiler, it cares and verifies and tat is what matters.
I work in a large company, and all new development is done 100% in Java (except the mainframe parts, in PL/1 but that is declining rapidly).
Re:It went to million servers and clients (Score:5, Interesting)
Let me correct you slightly. There is always the need to make changes to adapt to what MS does. Its just that with Java that responsibility falls to the JVM writers and not the application writers.
A windows JVM is just another windows c/c++ program. Many people keep forgetting that.
Re:Java is not back. (Score:2, Interesting)
Re:Return of Java (Score:0, Interesting)
Unless it shows some bugs on "obsure" platforms like AIX. A sequence of a.foo(); a.bar(); a.baz(); executed foo() and baz() but not bar(). It turned out to be a serious defect of the hotspot optimizer, which simply optimized away the call to bar(). Another bug was that sometimes, threads simply disappeared into nowhere. So, we decided that, instead of letting Java drop threads, we would drop Java on AIX.
Re:And for anybody who doesn't believe... (Score:5, Interesting)
Well, you must be pretty hopeless not to be able to install the Java runtime. Last time I installed it on Windows, it took half a dozen mouse clicks and a couple of minutes tops.
We're talking about the average Joe here. The average Joe just wants to double-click the installer for a program, click OK a couple of times, and have it work. I know from experience that such a requirement can be a great hinderance to adoption of a software application. I released a program with a
That's strange, it must be their inability to code an interface and data models in an efficient manner. I write warehouse control software, where we are dealing with vasts amount of data that must be collated and displayed to the user. Very rarely do we have to resort to doing major grunt work on the server as opposed to doing it in the Java client.
Swing _is_ rather unresponsive and slow unfortunately, due to it using no native widgets. This is solved by SWT, which mixes platform independence with use of native widgets where they exist. For this reason for example the popular Java IDE Eclipse (written with SWT) is much more responsive than Sun's IDE NetBeans. Swing in general is one of Java's major weaknesses (and its not 'excused' on the basis of platform independence) - not only in terms of speed but its layout managers for example are also a joke - and is the main reason why Java is used far far more for websites than application programs.
This could be rephraed as "bad Java programmers leak memory". I have client-server Java applications that run 24x7 without leaking memory.
I agree with you there, and would also add that 'very bad java programmers leak memory' while 'even pretty good C/C++ programmers leak memory. While one can leak memory in any language, Java does make it a lot easier to avoid. I have C++ programs where I've never found leaks despite a fair bit of work trying, yet I can't recall testing a single Java program for memory leaks (and I've written and tested a lot) and ever actually finding such a leak.
If this is really an issue for you, then you can tweak the runtimes environment. Yes, Java does requisition a lot of memeory when an untweaked JVM starts up, but the inmpact depends on the machine running the program.
Unfortunately for the average user with 'just' 256/512mb RAM on their machine, thrashing is almost an unavoidable consequence of using any non-trivial Java application. For development I find 1 gig RAM is a minimum for devloping with Java, whereas for
I might also add a thought relating to the actual editorial - comparing search results for 'NET' and 'Java' is hardly an accurate comparison, given that 'NET' is liable to find a lot more pages than just those relating to
Mobile??? (Score:4, Interesting)
But in Europe Java is really strong in the mobile phone environment. I have this SE 900 and it always draws lots of attention and things that strike me most are remarks of non-technical people, like the 16 (or something) year old girl at some fast food joint: "Does it have Java?" Even my sister (30, knows shit about computers) has it on her wishlist: a Java enabled mobile phone...
The fact alone that it is seen as some 'special' thing
Re:This writer is into amateurish journalism (Score:3, Interesting)
In addition to nets as trapping implements, consider the common "sentence"
Re:Return of Java (Score:2, Interesting)
Your statement is as correct as saying that Java is slow.
Java is not slow, but it's slower than a good C++ code; consider these words from Stroustrup:
When you get to percents, 10%, 50%, and such, you start arguing whether efficiency matters, whether next year's machine will be the right solution rather than optimization. But in terms of dynamic versus static, we're talking factors: times 3, times 5, times 10, times 50. I think a fair bit about real-time problems that have to be done on big computers, where a factor of 10 or even a factor of 2 times is the difference between success and failure. (http://www.artima.com/intv/abstreffi2.html [artima.com])
So yes, the average C++ programmer will write not the most efficient code (as Stroustrup compares differences in a factor of 50 between bad and good codes), and the Java's Hot Spot will then easily be faster than the average code. But remember that the Hot Spot can only guess what you are trying to accomplish; a C++ compiler can actually see what you are trying to accomplish. C++ compilers are not dumb, they can do really good optimizations (when you write good code, of course).
PS: using "C/C++" in a sentence comparing them to Java will make you look like you can't differentiate C from C++. Don't be so incautious unless you wanna be flamed by the "C++ is not the same as C" crowd.
The Reason Java 'appears' slow, (Score:2, Interesting)
There is this concept called MVC (or model view controller) That is regarded as the way to develop OO based GUI apps. However, pure MVC is the biggest stumbling block to performance.
The idea is, you have a VIEW (The actual GUI Code), that reads it's data from the MODEL, ( a data structure modelling the data that is viewed, and a CONTROLLER, that the view notifies when something happens, and then the controller updates the Model.
This, though well suited for a Web application, does not work well in a windows type environment. Consider for example an order entry screen consisting of 10 dropdown combo boxes, Buttons to add an order line, Tabs to show different areas of the order, (delivery address, customer credits, etc). Now the data model for this screen will be massive - each combo box's entire list of values will be stored within the single Model. On start-up, first the view will be rendered, then the data contained within the model copied into it. This process takes time, and makes the guy unresponsive and sluggish. In a Web application, this is not a problem , as the data has to get to the browsers some way or another.
With Java Swing, there is an alternative - Encapsulate the individual components with the data it requires to display, and only store within the external Data Model, the actual value that the component is set to. Eg, if you want a combo box with a 100 or so currencies to be selected, store the list of currency information, together with the combo box..... Call it a currencySelector or something. The 'Data Model' is still there to contain the actual chosen currency, just not everything else!
This way, you can cache up these components, so when added to the screen, no time is wasted moving all this data from the data model into the component. The data model becomes much smaller, and the components become fully re-useable.
The Swing applications I have written use this technique, and are easily as responsive as a native Windows Application....
Untill industry realises that MVC is not all its cracked up to be, we will be stuck with slow gui's.
As a Side note, Mac OSX uses MVC throughout , maybe this is why Aqua is view to be so slow.
Java.equals("chaos") (Score:2, Interesting)
Well, Java may be back for the time being, but I'm concerned that the language may still crash despite its new found momentum. The Java toolkits are fragmenting, Sun's market position is questionable, and alternative technologies are gaining in both strength and promise.
Sun's marketing materials always mentions Java's strength in enterprise development. But what, precisely, is Enterprise Java? Is it J2EE? Quite possibly, as a theoretical specification. But in real life, the platform is fragmented. On app servers, is Java WebSphere, WebLogic, JBoss, or Tomcat? For persistance: EJB 2, Hibernate, JDO or Cayenne? For Web apps: JSP, Struts, JSF, Tapestry? And just for fun, lets throw in XDoclet, Velocity, Cocoon, AspectJ, and about another thousand or so projects.
The diversity of new Java technologies is both great and terrible: great in the sense that new ideas are being explored that Sun may find to radical to consider putting in their specs, but terrible in the sense that few, if any, Java programmers will have knowledge of the various different projects. This is a real problem, folks. Someone who knows .Net can reasonably be expected to understand most of the C# related APIs. Its unreasonable to expect even a seasoned Java developer to understand how to program the full spread of Java APIs. Someone with Sun certification, an EJB whiz, may be damn well baffled by Hibernate (I've seen this), and may not comprehend why you'd use Tapestry instead of good old JSP.
I think the Java development platform is fragmenting. Sun's work, impressive as it is, often seems to be more concerned with being architecturally perfect at the expense of real world application speed and developer productivity (code astronauts). The Open Source projects seem to be trying to be as cool as possible, at the expense of API consistency and, just like Sun, developer productivity.
The general chaos in the Java world has, thankfully, allowed my development team to finally look at entirely different languages: Ruby, Python, even back to Smalltalk and Lisp. We've chosen this route out of frustration with both the limitations of the Java language and the increasing fragmentation of the toolsets.
As an aside, its fun to watch how hard various Open Source projects are working to emulate a ten year old toolkit: WebObjects. Yeah, WebObjects rules. Object Relational Mapping that works (and Hibernate folks, doesn't require learning yet another XML dialect to get things working). OO web page design, true components (Tapestry is essentially a copy of Web Objects Framework, made more obtuse). I wish Sun had started it's development efforts copying NeXT instead of Microsoft. We'd have a better development world today.
Re:Return of Java (Score:3, Interesting)
Java faster than C++ benchmark [kano.net]
Point 1 - "I was sick of hearing people say Java was slow, when I know it's pretty fast".
Baaaad start to any analysis - always keep an open mind about the results.
Point 2 - He used G++. So this is only valid for G++, not necessarily any other C++ compiler. Which is fair, I just feel this is worth emphasising.
Point 3 - It's rapidly determined that G++ takes much longer to execute a method call, than Java does. Given this, it shouldn't be a significant suprise that benchmarks relying heavily on recursion will be slow in C++.
For example, rewriting the Fibonnaci benchmark to use a for loop instead of recursion give a 600-times speed increase:
http://developers.slashdot.org/comments.pl?sid=11
Rewriting it into constant-space gave an almost 10 times increase over that:
http://developers.slashdot.org/comments.pl?sid=11
Moral of the story? Java is great for method calls , but I'm not so convinced about everything else...
the J2EE market has been going strong for a while (Score:5, Interesting)
When I was unemployed, I had monster.com and dice.com send me a daily email with every new job posting that contained "Perl" or "Java". For those ten months, I saw virtually no Perl jobs, and almost every Java-related job required J2EE experience.
So I took a basic class in J2EE, and said to myself, "No wonder there are so many openings for J2EE programmers: it takes a team of five J2EE programmers a month to put together what a good Perl hacker can make in a week." The hoops you have to jump through to get things to work in J2EE--most of which seem to involve working around Java's static typing and its object model--are absurd.
I've been re-employed for almost a year, thank God, and the group I work with is writing a J2EE-based ERP application. I have seen nothing so far to refute my original impression of J2EE.
But it still beats being unemployed.
Re:Stop moaning sweetheart (Score:3, Interesting)
I agree completely with this statement. This has become a much bigger frustration for me since I moved to OS X. I used to use NetBeans for developement. Netbeans looks fine on X11 and Linux, and OK on Windows, but looks horrible on OS X. So I switched to Eclipse, and it looks great. The Eclipse folks have shown that a little effort can make a Java GUI look good, and be integrated well into the native environment.
GC should handle circular references (Score:3, Interesting)
Everything I see is Java (Score:1, Interesting)
Why is java better than perl/python....it's NOT. (Score:3, Interesting)
Ummm - what about python or perl? Both of these are just as portable - requiring zero modification of the code to port to any OS.
And don't pull out the 'java is more efficient' bull scatology. I have a java application right now that my team is rewriting in perl because it runs too slow (and also has a memory leak - code is vendor proprietary, so they won't let us see/modify the source to fix it). There is nothing I can do with java that I can't do with perl or python - as much as David Berlind would say otherwise (his statement in the article suggests perl and python are good for 'scripting', but not robust enough for large applications). As a supposedly impartial journalist/editor for ZDnet - I have to question his motives for jumping on this bandwagon. Also, his primary focus on writing, rather than building apps, hardly makes him qualified to make such an accessment, imo.
Given that I would have to disagree with this editorial in JDJ.
The words of the COO of SUN, who has a vested interest in the success of java, and the words of a journalist, who from all appearances doesn't have the technical background to be taken seriously concerning application development issues, in an editorial on a website dedicated to java development, hardly seems like 'news' more than a marketing ploy.
Java isn't going anywhere but up (Score:3, Interesting)
Java isn't going anywhere. Java has at least reached the status of 'the next cobol', to quote Stu Halloway. This isn't a comment on Java's speed, quality, and such, it simply means that even if all Java development stopped today (which it won't), there has been enough investment in Java'based intfrastructure that the maintenance alone will be quite a large job market for years to come.
Java is NOT dead/dying. New, important projects start with it every day. I am the president of the Northern Virginia Java Users Group [novajug.com], and we have a steadily growing membership (now over 1100 members). I am also a speaker for the No Fluff Just Stuff Software Symposiums [nofluffjuststuff.com], and the discussions about Java tools, techniques, etc dominate that conference. Why? Because it sells. .NET has been gaining some momentum, and c# is undoubtedly the 'next big thing', but Java is here to stay. If you are a software engineer, Java is a 'safe place' to be for new and interesting work for the next 4+ years, at least. (That doesn't mean software engineers don't need to have diverse talent - but that is a topic for another rant).
Re:And for anybody who doesn't believe... (Score:3, Interesting)
Re: If only wxWidgets were truely x-platform (Score:2, Interesting)
Like it or not, the 2nd platform most business app developers want to target is the Macintosh. I tried porting a Win32 app to wxWidgets a while back, and it looked like I could get it to work on Windows (and probably Linux), but the Mac port was just not there. Widgets didn't draw, size or behave right, and I had problems getting sockets to work right.
It appears like there's a push on currently to get the mac support up to par (at least their website is soliciting contributions). It's a shame that Apple wouldn't fund this themselves, but I guess they're still pushing native Mac toolkits (though why, at this point in the game, I can't imagine).
Re:There has been some good alternatives (Score:1, Interesting)
Of course I hate writing getters and setters. All the major IDEs do that for you. I haven't written a getter or setter in ages.