Java SE 6 Released
twofish writes "Sun has announced the availability of Java
Standard Edition 6 final release. JSE6 now has dynamic language support.
It comes pre-delivered with Netscape's Rhino, a Javascript engine, and the scripting
project's home page documents many other available scripting languages,
including awk, Jelly, Pnuts, Python, Ruby, and Scheme. In addition a lot of
work has been done on the libraries and run-time compiler. The JIT has been
improved, with better runtime analysis of program characteristics, giving notable
performance improvements. Other improvements include better desktop support, improvements
in Swing look and feel, Windows Vista support, and better diagnostic support
(For example, profilers and debuggers can now attach to a running JVM without
specifically using a debugging-capable configuration. For example, if a problem
is found at run-time for a production server, a debugger can attach to it without
restarting the server).
Sun is also offering sixty days of free developer support for JSE 6 through
their Developer Services program."
Here is link tos sionid=C4783514291DD63EE652A5C2135F4C43
Java(TM) SE Runtime Environment 6 https://sdlc3e.sun.com/ECom/EComActionServlet;jse
As if Java and Javascript weren't already confused enough.
Here goes a whole new round of n00b education.
Maybe on the plus side javascript will begin to suck less.
And here I am in the middle of studying for the Java 5 certification exam while my workplace runs 1.42 and J2EE 1.3.
Reviewing just the first hour of video games.
Kudos on the new release. I'm running Vista, so the support will be nice.
But as a user, it always amazes me how hard it is to navigate Java's downloads. Assuming non-techies know that "Java Runtime Environment" is what they need to run Java apps, you still have to dig past a JDK and NetBeans link to get to it. I tried walking a relative through downloading the JRE a week ago and it took way longer than it should have.
I'm still waiting for them to release java as opensource
WulframII - Free Online Mutiplayer 3D Tank Shooting Game
What's the best way to get back into using Java? I took a couple of programming classes when it was still Java 1.3/1.4 a few years ago and totally missed the jump to Java 5/6.
If someone is passing you on the right, you are an asshole for driving in the wrong lane.
Well, why is very important. I am not a Java GUI programmer, but it seems to me highly implausible that widget rendering or event dispatching is a limiting factor on a modern system. This suggests that if Swing programs are often slow, something in its basic design encourages certain bad usage patterns. This seems to be consistent with what I have seen, which is that many if not most Java GUIs these days seem to be OK nearly all of the time. I'm reasonably sure it's not because they are all SWT apps.
Which is not to say Swing isn't a problem; it may take more skill to use well than a toolkit should.
Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
What happened to Sun releasing Java under the GPL? I'm still getting a click-wrap license agreement here...
'Yes, firefox is indeed greater than women. Can women block pops up for you? No. Can Firefox show you naked women? Yes.'
You can finally have apps that look alot more like win32 or gnome apps without using swt or some other less standard api. Also this release uses some Apple technology with their jdk by offering dynamic class loading. Startups should be alot faster. This and java7 which is already in development should be really exciting. Sun has been putting out alot of java releases recently due to .NET and competition is good.
http://saveie6.com/
The scripting support is specified at JSR 223.
Here are some additional new features:
BTW, why isn't this on the front page? All the fussing about the possible new license was there but not the product publishment itself.
Congratulations to all the hard working people at Sun, and those outside who contributed (I'm one of them).
I tend to get +5 for these kind of posts, so this time I'll post anonymously to prevent karma wh:
As usual, InfoQ has a nice writeup with good links.
Sun has a confusing number of portal sites for news and communities, but the two most lively ones are probably java.net and Planet JDK.
Remember that Java 6 is not GPL, the decision to go GPL came too late in the development phase, only JDK7 is GPL. But you can get JDK6 and JDK7 is under the Research Licence from Subversion, a good blog with info about how and where is here.
You were using the JDK 1.3/1.4, which implements Java 3/4. The language versions are numbered N, but Sun's JDK's are numbered 1.N.
Java 5 has added:
Java 6, I'm not as knowledgeable about. But Java 5 is certainly an improvement--it makes things less wordy, although most of the changes are skin-deep; the compiler implements generics as implicit casts (which are added to the class files), and the foreach loop with an implicit iterator. And of course boxing/unboxing slows things down too. But it's prettier, and besides, if you're using Java you probably already have a handle on where the performance is good and where it suffers.
ttuttle is a rankmaniac
They say they will be releasing parts over the next few months. The first true open source release will come with Java 7. Sun promised GPL with a linking exception; I'd wait and see whether they actually deliver or whether there are some unforeseen issues with it.
You'll know it when it happens, because that's when Linux distributions will start including it in their "free" portions. Until then, the announcement is meaningless.
Please note that it is no longer "J2SE", it's just Java SE. (As per the URL you pasted in your post.)
Sadly the marketroids still insist on calling it Java SE 6 and not Java SE 1.6 (which it is), but at least today we're better off than with Tiger, which was Java 2 SE 5 (aka 1.5)
You know, every time a java story appears here this line gets trotted out, but I'm really not sure that it's anywhere near as valid as it once might have been. From what I understand Sun have made a lot of efforts in the last few releases (1.3+) to speed up swing. I've written quite a few java applications in the last couple of years, all swing based, and none of them has caused me to have any concerns over the speed of the GUI toolkit.
Sure swing still has some other issues issues (eg proper native look and feel), but I'm sure that a lot of the complaints people have about the toolkit's speed are either very old prejudices or stem from poor coding within the application rather than from swing itself.
It's not J2SE anymore. Now it's just Java SE. (Although we still have the 5 (but really 1.5), 6 (but really 1.6) silliness, but it's a step in the right direction.
I think this was true 5 or 6 years ago, the same can't be said now.
Java GUIs have traditionally been 'slow' because they are double-buffered by default, and as a consequence they redraw completely before displaying. Hardware simply wasn't fast enough to do this gracefully -- it's only recently that most gnome/kde applications and some xp ones are expected to be double-buffered.
The double-buffering also lead to lots of inefficient widget redrawing, like for a while each widget was cleared with the bg color before being redrawn even if it then say put an image say over its whole area.
The other major slowdown was because Java's graphics were much more advanced than necessary, for example lines of width != 1 with end and joint caps, antialiasing, clipping regions (instead of boxes), custom renderers, etc. This made it difficult to integrate with the simple hardware acceleration at the time. Native apps had jaggy lines and solid colors as the main features.
More information can be found at Chris Campbell's blog, but yes, graphics are much faster in JDK 6 especially with the OpenGL pipeline turned on, although they were hardly "slow" in JDK 5. Also, the JIT compiler has been largely reworked to improve codegen (especially with -server flag specified).
Another common complaint about Java UIs is that the dynamic loading/binding/compiling/optimizing makes things slow the first time anything is done, a little less slow the second time, then reasonably zippy from then on. So the longer you work in a Java app, the faster it gets. In any case, I code in Java IDEs all day long and they don't seem any slower than native apps.
E pluribus unum
Agile Spaceport - You will never find a more wretched hive of scrum and villainy. We must be cautious.
Is it?
Build a tool even an idiot can use and only an idiot will want to use it. -S.O.B.
Not really. Dropping major version numbers has been done a long time before Sun thought about it. For example GNU Emacs lost its major number when it went from 1.12.xx to 13.something in 1985
X IMPRIMITE "SALVE TERRA!"
XX ITE AD X
Java 6 has made great strides in many areas, including speed, Swing LAF, etc. It now uses GTK theme engines (works with all themes) to allow swing apps to look more like GTK apps. The imitation is still very imperfect, but it's much improved over the old, crappy, Metal look. I believe generics have been improved some in 6, and I think, if I recall correctly, 6 marks the beginning of non-backwards compatible changes to the JVM itself to pave the way for a lot of exciting new features in Java 7, the most notable will the inclusion (finally) of delegates, making GUI event programming a lot cleaner. It's possible that with Java 7 finally on feature parity with .NET, someone could write a .NET to JVM translator, such as the reverse of ikvm, to allow C# code to be executed on a clean, GPLd Java stack. I still prefer C# to Java at this point, and it would be nice to have the difference between the two stacks (technologically anyway) be insignificant, hopefully helping developers who would choose .NET choose the now safer Java alternative. .NET really did get a jump on Java technologically up until now. It's better in several ways including the generics model, delegates, and being able to support a number of languages including python (jpython for JVM seems to be stalled). Java 7 will start to change all that. Sun's really proved they are listening to the community. Either that or .NET really got them scared.
Some guy wrote a SWT-compatible library that used Swing components and it was FASTER then SWT because Swing uses an opengl pipeline so gets more hardware support for rendering. The only reason to use SWT is to get a native interface.
If I can run a dialect of Lisp with all the speed of the JVM, then I'm sold.
We are Turing O-Machines. The Oracle is out there.
I'm not as excited about this as 5. What are the main new features?
Performance improvements, scripting interface, far better native look-and-feels, much improved debugging and profiling (far easier to connect tools with any running program), lots of XML and web services stuff.
If you have an OpenGL capable gfx card you should enable the OpenGL rending pipe for your Swing applications with this
java -Dsun.java2d.opengl=true *javaprogram*
It is disabled by default for compatability reasons, but all java programs should really make two launchers so users can choose.
The OpenGL path should be a lot faster now, since it has been refactored to use only a single thread to ship commands to the gfx card, which is the same technique that most 3d games uses.
It should be noticable.
Java5 and java6 are alot faster than its previous versions as dynamic class loading and other features are now used. Also swing is not threaded by default unlike every other toolkit out there. This means the gui would appear unresponsive if the rest of the app was busy doing something. Java6 threads the swing classes by default now which should eliminate this issue with poorly coded java apps.
I have used java5 on my old pentiumM 1.7 ghz notebook and it runs perfectly fine.
http://saveie6.com/
Nice (or not so nice) try of trolling FUD but the link works fine.
"I think this line is mostly filler"
- 206 - Core 2 Duo E6600 (2.4GHz)/DDR2@667Mhz/Linux 2.6.18.3 #5 SMP/Sun JDK 1.6.0-rc-b104
- 223 - Opteron 275 2.2GHz/Linux 2.6.11.12-grsec/Sun JDK 1.6.0-beta-b59g
- 349 - Pentium M 730 (1.6Ghz)/DDR2@400Mhz/Linux 2.6.15-cK1/Sun JDK 1.6.0-beta-b59g
- 401 - Core 2 Duo E6600 (2.4GHz)/DDR2@667Mhz/Linux 2.6.18.3 #5 SMP/Sun JDK 1.5.0_05-b05
- 408 - Opteron 275 2.2GHz/Linux 2.6.11.12-grsec/Sun JDK 1.5.0_01-b08
- 415 - Opteron 250 2.4GHz (dual)/Linux 2.6.8/Sun JDK 1.5.0-b63
- 596 - Pentium M 730 (1.6Ghz)/DDR2@400Mhz/Linux 2.6.15-cK1/Sun JDK 1.5.0_06-b05
Full results table."Man in the Moon and other weird things" - wfmh.org.pl/thorgal/Moon/
Actually it can be said. Java still runs slower now on Sun's virtual machine on windows machines than it did years ago on Microsoft's VM. Of course Mircosoft's VM is obsolete, but it's still saying something. Java simply can't compete with other languages on speed and I've never seen a convincing argument stating otherwise. I run a few tests on Sun's JVM a couple times a year, then promptly uninstall it in disappointment.
No no, not a flame at one being better than the other.
.NET fighting it out, seeing which can pump out the most solid platform, and it just improves on both side at lightning speed... we had .NET 3.0 recently (Workflow foundation ::DROOLS::) and now this. Its great!
Just pointing out...since Java came out and Microsoft was kicked out of the field, having to come up with its own "copy", things have gotten quite interesting for developers...
You have Java and
At the same time, the other languages are also forced to evolve to keep up, giving us little gems like Rails.
I am a happy camper.
Why didn't this make the front page? It's certainly a far more interesting thing for nerds than an article about bloggers.
I'll correct my previous post: some of the links from the page are bad, others work right. Perhaps Sun hasn't yet updated all the references?
"I think this line is mostly filler"
"I noticed it last night, before it got slashdotted."
Its the first time I've truly scooped slashdot! Woohoo!
Well the online api doc's kept pointing to version 6 while I was looking for version 5.
=)
"Forgive us our trespasses, as we forgive those who trespass against us." -Jesus Christ The Lord's Prayer
Finally Sun has stopped assigning a version number to a programming language. I congratulate Java on leaving the crowd of the versioned languages and joining the elite community of the non-versioned ones.
What do these tests entail?
What you say about double buffering is incorrect. Double buffering means that the components are first drawn into an off screen graphics context (simply put an "image") that is not displayed. After all components have been drawn off screen the result is displayed on the screen in one fast operation. The effect (and the reason why double buffering is used) is that users never see an incompletely drawn display.
The only performance difference to unbuffered drawing comes from increased memory usage and the displaying of that "image". Double buffering does not require any more steps during component drawing than unbuffered display. The useless clearing you talk about can be resolved by setting component opaqueness to correct value.
Antti S. Brax - Old school - http://www.iki.fi/asb/
I trained as a teacher and the Headfirst books use an approach that is designed about how most people learn, not simply to deliver information. They ran a risky course with the chance that people might find the illustrations distracting rather than educational. But it works for most people
"Sure swing still has some other issues issues (eg proper native look and feel)"
I remember reading somewhere that they had been working at improving that lately. I couldn't find the article, but here is some illustration of the improvements for the native GTK look and feel.
xkcd is not in the sudoers file. This incident will be reported.
Once you go to a newer pc (e.g. something like a P4+ with 1GB RAM) it improves considerably. What I find really annoying is that it still varies a lot from platform to platform. I've run azureus (a popular bittorrent app in SWT) on both windows and linux and several parts of the interface just worked better under windows. It links to the GTK-java libraries under linux so should in theory be pretty snappy, but the difference (especially in the 'peers' dialog) is very noticeable. As to your comment about slower PC's, I've tried running jEdit on a P3 with win2000 and it was indeed not pretty.
:-)
A thing with clientside java apps you might have also noticed, they really try very hard at reaching their OOM condition. Having done some java coding myself, I believe a big portion of it is simply bad coding, e.g. not clearing your references, keeping way too much info in memory, not using java.nio when you should, etc. This is more of a developer problem, but I believe inevitable when you abstract away as much as you do in java. Still prefer its memory handling to that of C though.
Interesting ... where can I find that library?
I couldn't locate it with google.
Another feature that Java 6 has doesn't seem to be getting any attention is JSR 269 (Pluggable Annotation Processing). I'm kind of excited to try it out.
The idea with JSR 269 (as I understand it).. you create a few classes that are specifically recognized as annotation processing classes. Run javac as usual. Javac starts out and looks for classes like these. If it finds any, it will run them on your remaining source code files. The logic you define in your annotation processors can access the source code and do pretty much anything with it.
As a very simple example, you could create an annotation @HasGettersAndSetters, and create a corresponding processor that automatically creates get..() and set..() methods for any class that you stick the annotation on.
There are existing libraries out there (Spoon), but the cool part about this is that it's all built-in to javac.
& I wish I knew the password to your heart . . . &