Home > Java > What’s New in the Upcoming Java v1.4.2 What’s New in the Upcoming Java v1.4.2 Submitted by Kim Pedersen 2003-05-21 Java 40 Comments What’s new in the upcoming Java version 1.4.2? The answer can be found in the discussion here. About The Author Eugenia Loli Ex-programmer, ex-editor in chief at OSNews.com, now a visual artist/filmmaker. Follow me on Twitter @EugeniaLoli 40 Comments 2003-05-21 6:31 am It’s funny how Sun and Microsoft are playing catchup with one another. I guess this time around it was Sun’s turn. Personally, I’m excited for these new features in 1.4.2 – I only wish Sun would focus on increasing the speed of Swing. 2003-05-21 6:36 am Nothing amazing. Waiting for 1.5 when you http://java.sun.com/features/2003/05/bloch_qa.html“> 2003-05-21 6:37 am Java is very important to everyone. I am glad to see that Apple is finally working with other companies instead of trying to do everything by themselves like they used to. I would love to see a JAVA Office! MAC and Linux users would LOVE IT! Corel talked about doing that a while ago. I hope Java can get to the point were we could get real products like that. 2003-05-21 6:55 am There is an Office suite written in Java: ThinkFree Office. See http://www.thinkfree.com/. 2003-05-21 6:55 am So basically it consumes huge amounts of memory for each process, even if it is just a tiny program. It is completely unusable on the client side. Apple has had VM sharing for years. What is wrong with sun? Why can’t they implement this simple feature that would benefit everyone on the client side? By the way: .NET has VM sharing since its inception. If you want to run java client programs, you are probably better off to use the java compatibility mode of the mono vm. 2003-05-21 6:59 am > Ken Russell: We are planning to make more startup > improvements in 1.5, but cannot provide specific details > at this time. We are continuing to work with Apple > Computer to develop and integrate their VM sharing code, > but can make no guarantees about its future availability > in Sun’s J2SE releases. > So it is not even guaranteed for tiger…. Disgusting! 2003-05-21 6:59 am “I only wish Sun would focus on increasing the speed of Swing.” Apparently they have. From the article: “A couple of summary results are that startup time for command line applications has been decreased by roughly 30%, and for small Swing applications by roughly 15-20%. These results seem to have carried over to larger applications also; NetBeans starts up about 15% faster on 1.4.2 according to our measurements.” 2003-05-21 7:14 am Scott Violet: We are always looking for ways to improve rendering performance. Beyond 1.4.2, we are looking at using OpenGL on Solaris and Linux. A blind man can see a kind of trend. 🙂 2003-05-21 7:18 am Apparently they have. From the article: “A couple of summary results are that startup time for command line applications has been decreased by roughly 30%, and for small Swing applications by roughly 15-20%. These results seem to have carried over to larger applications also; NetBeans starts up about 15% faster on 1.4.2 according to our measurements.” Yeah I saw this and it is a bonus. But I want to know what a small Swing application really is. My apps are typically comprised of 40-60 classes and a pile of 3rd party components. Is this a small app?? Also, this relates only to load times. How about in general operation – refreshes and repaints? I guess we’ll see won’t we. 2003-05-21 8:04 am tuttle, cose VM sharing is not so simple. Go to http://research.sun.com/, and look under Barcelona. Read some of great papers there, and see what they are trying to accomplish. I asked that question you are refering to, and am very interested in seeing that and isolation API in java ASAP. But, hey, I do not want to have unstable VM. So, I will just have to be patient. Which I am. There is not much alternative for me cose I don’t want to wirk with anything related to MS. And, realy, Java is not all that bad, nothing is perfect. It is actually very nice to work with. And when/if Tiger brigs those on table, heh, close to beeing all I ever wanted from platfom/language/api. 2003-05-21 8:22 am Personally I’m looking forward to 1.5 which is going to include a number of important enhancements, including the one that I’ve been waiting for since Java 1.0 — Generics. Generic types is the feature that is more usually known as abstract data types, or in the C++ world, templates. It’s a way to define a container class without knowing ahead of time what type of object the class will contain. This is a very powerful feature for code reuse … in my opinion more important than inheritance. Up till now the standard way to do this in Java has required the objects to be stored as generic objects, and then explicitly cast to the correct type in code when they are extracted from the container, thus undermining the type checking. With 1.5 and Generics support we’ll have fully type-safe generic container classes. Yay, the Java Community Process! 2003-05-21 8:24 am Good article on Java generics: http://www-106.ibm.com/developerworks/java/library/j-djc02113.html 2003-05-21 9:09 am I’ve run Forte Developer and sure, I have 768MB RAM but from my experience, the complaining a slow speed has some merit, however, it isn’t as bad as some people try to make it out to be. Sure, java isn’t a speed demon, however, there is a fine balance between security, speed and stability. You can have two but not all three. Java is moving slowly forward, but to ensure that mistakes are not made in haste they are looking at the bigger picture. Just look at ActiveX which has become the source of most of Microsoft’s security nightmares. Had Microsoft done the long and hard analysis they would have seen the problems that could arise and would have designed it from the ground up to be a safe component API. 2003-05-21 10:22 am Maybe someone can tell me this: Does Sun supoort the idea of compiling java source code into machine code? I understand that hotspot does this with parts of the code, but I was wondering if you will be able to get java apps in the future that are not bytecode but completely compiled to native binaries. Just like gjc does it. 2003-05-21 10:35 am If VM sharing is so complex, then why does apple have a sharing java VM for years now? If you start 10 swing programs on an OS X machine, only *one* VM is started, the Swing classes are JIT-Compiled only *once*, and you get very good startup times except for the first program since the VM is already running and the Swing classes are already JIT-Compiled. SUN has licensed this technology from apple, but apparently they are totally incapable of including it into their own version of java. So for client side programs, only the apple java vm delivers acceptable performance. I have been hoping for VM sharing when 1.4 came out, and now they are not even sure they will deliver it for 1.5….. So the only way to write decent client side programs in a modern VM based language is (a) buy an apple and use Java+Swing or Java+Carbon (b) use .NET and Windows.Forms (shudder!) (c) use mono and GTK# (quite nice) Writing decent client programs using java on Windows or Linux is impossible as of now. 2003-05-21 10:50 am Even if .Net won’t do anything directly for non-Windows users, it forces Sun to spend time and money on improving Java… everyone wins 2003-05-21 11:20 am I don’t get it. If Swing is slow then why not use SWT? Isn’t SWT faster? 2003-05-21 11:30 am … or use OpenGL as your GUI http://java-game-lib.sourceforge.net/ 2003-05-21 11:33 am I would like to see IBM’s JDK up-to-date and available for Windoze. I prefered it much better in terms of speed. Speaking of speed, heard of J9? J9 is IBM’s J2ME solution. It is fast and supports AOT (Ahead-Of-Time) compilation to native code. No JIT delays! Why can’t IBM make it into a technology for J2SE/J2EE as well? Sun in the way? I have always felt that J9 is the answer! http://www.embedded.oti.com/ -magg 2003-05-21 11:51 am I need some help here:) I know there are lots of IDE’s for JAVA, some of them are free like eclipse, but I can’t find any IDE oriented by objects. What I want is drag and drop to a form objects like labels, edits, combobox’s, etc… and make the source for them. I think eclipse don’t do that. I know there is a commercial software that do that, JAVABUILDER of BORLAND, which I think is the best tool for developping JAVA SOFTWARE quickly… Thanks borland:) 2003-05-21 12:17 pm I think what you are looking for is something like NetBeans ( http://www.netbeans.org ) or Sun One Studio, which is somewhere one http://java.sun.com . Both of these have GUI, erm, GUI builders. They let you drag and drop all you want, customize all the actions/events/properties of every component and generates all the code for you. I personally use NetBeans as I feel its less bloated then Sun One (which is actually built from NetBeans), but thats just my opinion, both are great IDEs. 2003-05-21 12:29 pm I wonder, what is Sun’s financial interest in Swing? As far as I see, they only make money on J2EE licenses to companies like BEA. BTW, JBuilder is also a popular gui builder that can be obtained free. If you want fast swing apps, use the popular: http://www.jgoodies.com/ Go ahead, download the demos if you’re doubtful. This provides an API on top of swing. I haven’t yet developed in it, but definitely would consider it before embarking on a java client dev project. 2003-05-21 12:31 pm tuttle, have you tried Apple’s VM? I did. Nothing spectacular. And it doesn’t really start only one VM. It just shares some data structures. GC and compilers and heap and even your code aren’t shared at all. I really urge you and anyone else interested in concept to actually read Barcelona papers at research.sun.com. Many things about complexity of such solutions are discused there. I don’t want one bad process to crash all the others. I want native code isolated. I want to keep security. And I want all of that portable accross all Sun supported platforms (Lin,Win,Solaris). Now, that really isn’t such a easy task. Again, they (Sun) have some prototipe VM’s, and I’ve read somwhere that they contacted someone from JDistro, to showcase sharing with JDistro, in 1.5. timeline. We will see. I sure hope. 2003-05-21 2:58 pm I am glad to see that Apple is finally working with other companies instead of trying to do everything by themselves like they used to. I would love to see a JAVA Office! MAC and Linux users would LOVE IT! Corel talked about doing that a while ago. I hope Java can get to the point were we could get real products like that. As someone else already mentioned, it’s been done in some places. Corel tried to do it (not just talked about it) and dropped a lot of money into it before figuring out that it wasn’t giving them acceptable performance at the time (this was a few years ago, when Sun and Netscape were giving Java so much hype that many people thought it would replace everything on the client). Java’s improved, and developers are more familiar with it, so it’s likely that newer Office-type projects are doing much better with it, but I’d still rather have something written in C or C++. 2003-05-21 4:13 pm “Writing decent client programs using java on Windows or Linux is impossible as of now.” tuttle, get a life please. there are many client side java programs. go to sourceforge and look. you will see more than half of open source projects are java projects, and lots of them are client side programs. vm sharing is a necessity for java, and it will come in the end. why should i use mono? it is certainly not cross platform compatible, and i wouldn’t rely on it on any serious program. yes, it may take 10 seconds to initialize a client side program with java. so what? i do use that program for hours after running. and i can run it on every fucking available platform. i am sorry, but i won’t shift from java to unreliable mono for gaining 5 seconds of initialization time and loosing cross platform compatibility. 2003-05-21 4:27 pm “So basically it consumes huge amounts of memory for each process, even if it is just a tiny program.” I don’t know why this it trotted out every time Java comes up. It’s just not true. It’s the way processes are listed that makes it appear this way. Each thread in a Java program is listed as a separate process in, say, Windows Task Manager. That means if the program is using 10MB of RAM and spins off 4 threads it APPEARS to be using 40MB (10 for each instance). What is really happening is that each thread has access to the SAME 10Mb of RAM. I don’t know why people feel the need to go to all the trouble of posting when what they ultimately produce is just nonsense at best and deliberate misinformation at worst. 2003-05-21 5:28 pm http://konspire.sourceforge.net/faq.shtml#whyNotJava Quite simply, Java is not a good design. The amount of programmer effort it takes to build even medium complexity software is staggering. The amount of bloat in any Java program is awe inspiring. “Uhhh… how many giant SPARC machines will it take to run our business app?” Somehow the myth got created that memory management in C/C++ was this black art. Well, it turns out memory management in Java is ten times the black art it is in C/C++. Java will turn out to be one giant mistake for the companies that build their infrastructure on it. 2003-05-21 5:33 pm Maybe you should read and understand my posts before you answer. I am not talking about the somewhat misleading output of the UNIX ps and top commands here. Whenever you start a new java VM, a new *process* is created, not just a new thread. And as you might know, threads in different processes do not share their memory. If you had 10 small swing applications as icons on your windows or linux desktop and clicked on every one, you would start 10 *processes* that do *not* share any memory. Each of these processes would spawn a few threads. This is a waste of memory and processor power, and does horrible things to CPU cache efficiency. 2003-05-21 5:39 pm > vm sharing is a necessity for java, and it will come in the end. When? In the year 2020? It was a release driver for 1.4, and now it seems that they will not even include it in 1.5. > why should i use mono? it is certainly not cross platform > compatible, and i wouldn’t rely on it on any serious program. I don’t care what you use. If you are happy with java client applications that are slow as hell even on athlon gigahertz monsters, that is fine by me. But normal users will never accept java client applications if they stay as slow and memory-hungry as they are now. 2003-05-21 5:54 pm Java for older computers running with a pII 32 megs like mine is impossible. Sun is only interested in server side E-commerce mainframes with terrabytes of mem. Competition is KING and we are learing it. With Microsoft(everyone hisses) coming out with Net(nice lang i hear) , Sun now is all of a sudden interest in memory performance. I congratulate Sun for Java. It took away the spotlight from Microsoft. It’s important that Microsofts Net also suceed to balance of Suns Yin to Microsofts Yang. My only question is why no one uses GNU GCC GjC ,java compiler? Couldn’t Mozilla browser use something like this integrated into it for running on client side? 2003-05-21 6:18 pm That “konspire2b” link is FUD. In fact, it’s a web app, so of course it doesn’t matter if it’s not written in Java! Their FUD points: – java applications are difficult to install This assumes you must provide the Java VM as a separate install. WRONG. Grab the VM, look at the nice readme that tells you all you can strip, and stick it in a subdir with your app. Yet I consider this criticism “party right” because a lot of people don’t do this, and Sun is silent on the issue. – java applications start up slowly Client-side Java is not where all the action is, so you should use the high quality 3rd party libary JGoodies. Another understandable point. – java applications use a lot of memory Use JGoodies. Try out the demos and notice how reasonable the mem required is. Ok, a lot of Swing apps don’t use it. – java applications leak memory This is the absolute FUD, and it is either incompetent or disgusting. Suppose you write a program whose entire point is to read your entire HD into a massive string of bytes in memory. A memory leak, right? This is BS, of course you can run out of memory even if you have garbage collection. With tools like JProbe’s excellent memory debugger, you can easily find memory mistakes. 2003-05-21 7:21 pm Even IBM had a office suite in the Java language, unfortunately or not depending on if you invested in it, IBM didn’t bother pursuing it much further. Now that Java is faster, it could be a valid ideal again (I don’t know about ThinkFree office) but whether any company with cash is interested is another matter. 2003-05-21 9:56 pm Thanks Ender, netbeans is one of the best gui’s I ever seen for developping java and it’s opensource. http://www.netbeans.org Eclipse is a great IDE tool for coding, but I can’t drag and drop objects:) http://www.eclipse.org 2003-05-22 3:46 am If you want Java IDe there are lot of optio If I would like to buy a IDE I would choose IDEA intelliJ I think this is the Best IDE for Java in the market. In opensource NetBeans, Eclipse and JEdit are great. I have been developing for the last 12 years I have coded in C, C++, 4GL, and other OOP languages. I think Java is my most favorite language. I have not seen any language so detailed orienteed in API’s and so well written. In the last 4 years I have written close to 10 applications in Java half of them were enterprise application. All the these application scales very well and are stable as a rock. My favorite App servers are Weblogic and Webshere for enterprise apps. For small apps TomCat. 2003-05-22 6:15 am Sun is responsible for the GREAT FLAW in mozilla based browsers. Try playing pool on Yahoo. Or any game on Yahoo, along with an endless string of these messages from lots of different websites. APPLICATION/X-JAVA-VM is needed to access this page. I along with evidently swarms of others using mozilla based browsers have the same problem. Go to google and type in x-java-vm, and the list is endless. You can download all the java plug-ins you want from sun, follow the directions to a tee, but IT NEVER WORKS. Same error every time. Why does IE come with perfect java and mozilla with handicapped java. Why does netscape come without java at all? Seems like sheer stupidity on the mozilla developers side, or on Sun’s side. One or the other,YOU CAN’T PLAY GAMES ON YAHOO WITH MOZILLA!!!!!!!!!!!!!!!! 2003-05-22 10:20 am > vm sharing is a necessity for java, and it will come in the end. “When? In the year 2020? It was a release driver for 1.4, and now it seems that they will not even include it in 1.5.” when it is ready. what i am saying is, it is really not that important. there are many java clients, and they are running very well. and, it will be included in 1.5 most probably. > why should i use mono? it is certainly not cross platform > compatible, and i wouldn’t rely on it on any serious program. “I don’t care what you use. If you are happy with java client applications that are slow as hell even on athlon gigahertz monsters, that is fine by me.” they are very fast tuttle. many java applications are running as fast as native ones now. so, please stop lying. “But normal users will never accept java client applications if they stay as slow and memory-hungry as they are now.” they are already accepting tuttle. java on the client side is exploding. we are yet to see some mono achievements. 2003-05-22 10:26 am They’ve already got on in progress right now. it is Lotus Smart Suite written in Java and will be bundled with the next release of websphere. It will be accessible via webbrowser and designed for companies who want to try and cetralise as much as practically possible so that it cuts down on administration costs. 2003-05-22 12:02 pm IIRC, Yahoo’s applets are made using MS’s version of Java. That’s why it doesn’t work in Mozilla (uses Sun’s VM) and it occasionally works in IE (MS’s VM). If you want a target to blame, in this instance its right to blame MS for polluting Java. 2003-05-22 7:24 pm >YOU CAN’T PLAY GAMES ON YAHOO WITH MOZILLA!!!!!!!!!!!!!!!! yes, you can. just follow the instructions about installing the jvm (you can find them in the release notes for mozilla). 2003-05-23 1:23 am Why doesn’t mozilla come with the necessary plugin’s already installed? IE does. Oxygen web browser is the only other browser that comes with all the plugins installed. This throwback to the old netscape browser, “WE BUILD THE BROWSER, YOU FIND AND INSTALL THE REST” is the reason Netscape lost the browser war. It was not a “complete” browser. Nor is Mozilla,or Opera. Can’t play games on Yahoo with Opera for Linux either.