Středa VIII 23, 2006

Eclipse on Swing?

Have you seen project EoS? The aim of this project is to run Eclipse on Swing. I've tried it and it really works, although it's in a very early stage now and it's very buggy. You just need to replace the SWT library by a "Swing on SWT" library and Eclipse runs on Swing. I am really looking forward to see this project mature. The creator of EoS must like Lord of the rings... see why.

Eclipse on Swing on my AMD Opteron running WinXP 64bit

Úterý VIII 22, 2006

Sun Microsystems, a ČVUT zakládají Java User Group

Je mi potěšením oznámit, že Sun Microsystems, portál a ČVUT v Praze společně zakládají Java User Group (JUG).

První setkání JUG proběhne dne 12.září od 18:00 v posluchárně K1 na ČVUT na Karlově náměstí. Při této příležitosti promluví Laurie Tolson, víceprezidentka pro Javu a vývojářské nástroje v Sun Microsystems. Vyššího člověka přes Javu v Sunu už nemáme :)

Pro ty, kteří nebudou moct dorazit bude připraven záznam v DivX, který bude zveřejněn na internetu. Doporučuji ale přijít, protože vytvořeni záznamu nějakou dobu potrvá a taky budeme rozdávat trička. Více informací naleznete na

Na vznikla nová položka v menu "JUG", na této stránce budou vždy nejaktuálnější informace o budoucích setkáních a záznamy z minulých setkáni.

Co se týká obsahu přednášek, Pražské vývojové centrum Sunu navštěvují vyznamné osobnosti ze světa Javy, takže v případě takovéto návštevy je pozveme na setkání JUG. Kromě toho máme domluvené prezentace od různých českých firem a univerzit, takže se dozvíte i o technologiích, za kterými nestojí Sun. Také plánujeme oslovit zahraniční speakery, kteří navštěvují konference po Evropě.
Na viděnou na 1. setkání JUG!

Sun Microsystems, and Czech Technical University found official Java User Group in Prague. If you need more information in English, feel free to contact me.

Pátek VIII 18, 2006

Discussions about Opensourcing of Java

There are some excellent thoughts on this topic:

Alan Williamson's view

Manfred Riem's view

Macehiter Ward-Dutton blog

Tom Tromey of GNU/Classpath

Cote's view

James Governor's view

Discussion at Javaposse

One thing that sounds from just everywhere is that people want Sun to do it cautiously and make sure that compatibility is preserved. The choice of the license will be really important - the license is discussed in the open now.

More information available at Open Sourcing the JDK.

Btw, first builds of JDK7 are available!

Středa VIII 16, 2006

Why I Don't Like Lawyers

It has been decided that we cannot use Mustang and Dolphin as project names anymore. So there's now and It's a sad world, the one where you cannot use cool project names. And I have to change all my slides with pictures of horses and dolphins. Sometimes I just wish there were no lawyers on this world, sigh...

Úterý VIII 15, 2006

News About Opensourcing Java

It's going to happen "per partes", so the first part was just announced. Java Compiler and the Hot Spot VM are the first parts to be opensourced. The license is still being discussed, makes me wonder what it will be (Jonathan Schwartz said even GPL was being considered), it will be an OSI-approved license for sure. Java ME is going to be open sourced, too, I heard it could happen even this year. More info available here. Čekají nás zajímavé časy... :)

Sobota VII 01, 2006

Java One Technical Sessions Available Online

Technical sessions from Java One 2006 are available online (including recorded sound and transcripts). Cool!

My Callisto Experience

In this blog entry I would like to summarize my experience when running Eclipse Callisto on my desktop during last 2 hours. As a NetBeans evangelist I am clearly biased, but I will try to be objective. If you doubt it, you don't have to read this blog entry :)

The installation/download experience is ok. It takes quite a while to download, but that's fine, I'm behind a 6 Mbit line so I don't mind installing more than 250 MB of data (although I am used to much smaller download sizes from NetBeans). Installation went without problems, let's try to run it.

I'll start with the good. What I like on Eclipse: fast editor, for pure java coding it's great, code completion, hints, problems window, all work fast and are helpful. Local history is neat. Import/export functionalities are useful. The outline view is on the right position (unlike our navigator). I get used to the dialogs quite quickly (I run on Windows). I really like Ctrl-1. I like embedded native browser, so much better than swing browser. I like many formatting options. I like getting javadoc/help on mouseover. Replace in project/workspace is nice. I like code completion for javadoc (actually code completion everywhere). I like things like "remove unused import". I like rename in file and mark occurences.

I wish we had these features in NetBeans, with a similar speed as in Eclipse (and the good news is that AFAIK many of them are going to appear in 6.0 including speed improvements). All these features come from classical Eclipse, so I am actually not trying the full Callisto yet.

Now comes the bad and ugly. I try to use Eclipse Callisto outside the Java editor - do some more advanced stuff. I try to create a J2EE project in Callisto... it offers me to create a J2EE application with xDoclet (?). I have not found a way how to create a normal session bean... do I really have to use xDoclet to work with J2EE?

Next I try to work with C/C++ in Eclipse and I am not able to run my C/C++ project whatever I do. It just says "Launch failed no binaries". I do have a file with a main method... I wonder what's wrong.

Then I hang Eclipse a couple of times when trying out the enterprise stuff - it just hangs and disappears.

Let's try someting else... I create a SWT Frame and almost immediately get an Out of Memory Exception (I have 1 GB of RAM).

Second attempt... so I create the Frame... why is this stuff so slow? Hmm still the old gridbag way, no functionality like Matisse.

So I try to use the "dynamic web project" and at the end of the wizard I get:

One or more constraints have not been satisfied. Cannot install project facet Java 6.0. Some version of this project facet is already installed.

What is this...?

I get another Out of Memory Exception and need to restart Eclipse.

Now when launching Eclipse I get an error that the workspace is already being used so I need to create a new one. Ok I create a new workspace.

I try to create the EMF project. I choose to create the sample project. Eclipse hangs and then disappears from my desktop. Another restart.

Next I try to create the "dynamic web project" again. Now I get a dialog which tells me it tries to open a XSD file and I need to accept a license. The license says: "Action canceled, Internet Explorer was unable to link to the Web page you requested. The page might be temporarily unavailable." I accept this license and open the J2EE perspective. I hate perspectives.

I create a simple web application with an HTML page and a JSP. I try to run it, but it doesn't seem to work. I need to define Tomcat... but I cannot find it in the Eclipse installation.

I give up... going back to NetBeans.

Conclusion: I like the editing functionality of Eclipse. But outside the editor, there is a lot of work to be done. I don't accept getting so many bugs and so many hangs in less than 2 hours, I've been just using the wizards and doing nothing really demanding (on Windows XP with JDK 1.5.0_06 and 1 GB of RAM). Although I am an experienced IDE user - I've been using NetBeans, JBuilder, IntelliJ IDEA, Eclipse and JDeveloper in many versions in the past - I really have a hard time to work with most of the advanced features of Eclipse.

It is great that Eclipse Callisto was delivered on time but it really needs some QA and usability reviews. NetBeans beats Eclipse in the out-of-the-box experience, while Callisto is a good step forward, it's just the very first step. I think both projects have what to learn from each other so I can't wait to compare them again say after one year, both IDEs are moving forward in a fast pace.

P.S. Here is the log file with Out of Memory Exceptions.

Středa VI 21, 2006

New Song: Java EE 5!

People who know me personally know I'm not afraid of doing things some other people would consider... well, weird at least. So it was last Sunday I had this creative mood and thought it's been quite a while since I've done something a bit crazy. I heard the "Mambo Number 5" song on the radio, well, I don't really like that song so much but my mind was wondering at that time somewhere in the Java EE 5 world (trying to figure out what's the best way to talk from NB platform with an application server). And then it clicked... Mambo Number 5... Java EE 5... there must be more I can do with the lyrics :)

So I recorded a new geeky song about Java EE 5 (hosted on Javalobby). It would be a pity not to share it, I'm not a professional singer - but that makes it even more fun, I guess. Rick Ross liked the song and wrote a nice discussion post on Javalobby about it, I'm definitely looking forward to the discussion!

It goes like this...

Ladies and gentlemen, this is Java EE 5!

One, two, three, four, five
There's a technology I use day and night
For my application with a web frontend
They told me to use .Net
But I really don´t wanna

So many bugs I fixed last week.
My code is neat and talk is a cheap
I like Glassfish, JSF, persistence API
And as I continue you know they´re gettin´ sweeter

So what can I do I really beg you my Lord
To me codin' it´s just like a sport
All the bad code from the past, let me dump it
Please set in the trumpet

A little bit of injection in my life
A little bit of persistence by my side
A little bit of NetBeans is all I need
A little bit of EJB's what I see
A little bit of standards in the sun
A little bit of XML all night long
A little bit web services here I am
A little bit of code makes me real man

This is Java EE 5!

Jump up and down and move your code around
Shake your head to the sound bury bad code under ground
Move one step left and one step right
One to the front and one to the side
Refactor it once and refactor it twice
If it looks like this you're doin´ it right

A little bit of injection in my life
A little bit of persistence by my side
A little bit of NetBeans is all I need
A little bit of EJB's is what I see
A little bit of standards in the sun
A little bit of XML all night long
A little bit web services here I am
A little bit of code makes me real man

This is Java EE 5!

Maybe I will grow up once. Maybe I won't...

Čtvrtek VI 08, 2006

Abstraction of an Abstraction of an Abstaction...

Peter Thomas has an interesting snapshot of method calls from the NetBeans profiler. It is quite amazing what all can happen nowadays between before making the actual JDBC call in a HTTP response. Programmers who write code in Assembly or even in C/C++ can be shocked by this picture ;)

Pondělí V 22, 2006

A Coincidence

Romain Guy has just blogged about the Javapolis DVD while my copy has just arrived by post today. Romain is right, it is great, especially because it also contains videos with demos from individual speeches. The quality of these videos could be better, but still it's absolutely worth the money.

Čtvrtek V 18, 2006

Pictures from Java One Race Car Competition

I recorded a short video and took a couple of pictures from the Java One car racing challenge. It seems to be very popular, there's always a queue of people who try to drive with the best time. Well, it seems that the biggest problem is actually to stay on the track, the cars fell of the track quite easily (once it flew completely away).

Car race video (6.2 MB)

NetBeans plug-in for car race

NetBeans booth with NetBeans developers

Demo of project Darkstar, Sun gaming server

Pondělí V 15, 2006

Rockin' Java!

Just a thematic picture
from the streets of San Francisco :)

Středa V 03, 2006

Coming to NetBeans Day or Java One? Try the Java One Session Planner

The Javalobby team has created a very nice application (currently in early access) which you can use to plan the sessions you want to visit at NetBeans day in San Francisco or at Java One. It was built using NetBeans and it looks pretty cool. Kudos to Rick & the team for this nice application, I will definitely use it :)

Click on the image to webstart early access version of the planner

Hint: If you want to go to all NetBeans-related sessions, just search for NetBeans and then you will see sessions about NetBeans.

Sobota IV 15, 2006

Frameworks and Hammers

In a search of a perfect hammer (or a hammer factory... or a factory of hammer factories... or generator of factories for hammer factories?). There is some truth in this story and that's why it made me laugh. Maybe complexity will lead us back to simplicity... and we'll get our perfect hammer. Maybe not.

Úterý III 28, 2006

A New Kind of Religion?

Did you notice how much religion we enjoy around Java web frameworks? Ok, I know, you would be blind and deaf not to notice. People really become zealots about their favorite framework (it can be Spring, Hibernate, Struts, JSF, ... or now Ruby on Rails which is not Java-based but somehow got into these religious wars).

Some people say JSF is dead on arrival because their favorite framework is so much better (while IBM tries to clear the FUD, btw this is a great introduction to JSF). Hibernate fights with Spring. They say Ruby on Rails is going to wipe out Java from the web development space. Isn't that kind of ... funny?

Who is right and who is wrong? When discussing web frameworks, you hardly see rational arguments, what you rather see are heated discussions. Web frameworks are now rather a religion: "Framework XYZ is the only clean framework and it is the only framework to perserve!". I know, I'm exaggerating, but you get the point.

My recommendation: use the best tool for your job. Not only when choosing a web framework but also when choosing an IDE or any other tool which helps you get your job done. Just don't become fanatic and stay open-minded. And remember, we are all a bit different and work a bit different so what works well for you may not work well for your colleague. There's nothing like a perfect web framework to solve all the problems :) And yes, there's nothing like a perfect IDE...

Čtvrtek II 16, 2006

Mustang Beta? Too Old for Me!

The JDK6 (Mustang) beta is out. It's great, but I won't use it. Why? Because I love living on the edge. I use b71 now, AFAIK the beta is b59 and there are several important bugfixes since b59 so won't go back. One new bug in b71 is with code completion, but I can live with it (a new window gets opened when I press ctrl-space and then goes to void immediately). Now I need to make sure this bug gets fixed in JDK.

Pátek II 03, 2006

Java Podcasters Interviewed

Chris Adamson of O'Reilly interviewed five Java podcasters - the JavaPosse, the Swampcast, the ZDot, the DrunkAndRetired and guess what, yes, the NetBeans podcast :)

The interviews are split into two parts:

The Java Podcasters, Part 1
The Java Podcasters, Part 2

I guess I should subscribe to the other ones as well... so far I've been only listening to the Javaposse podcast. The other ones look like fun, too.

Středa I 25, 2006

Download Creator2 for Free

You can download Java Studio Creator 2 for free from:

It's built on top of NetBeans 4.1 and it provides a nice WYSIWYG JSF editor. In this version it also contains lots of new JSF components (unlike the version 1 which contained only the standard ones). If you need a tool to create JSF pages fast, Creator might be a good choice... although if you rather need a "Swiss Army Knife" for Java development, I would suggest to use NetBeans :)

Pondělí XII 12, 2005

How to Learn Java Technologies Online (and for Free)

If you are having hard time to learn many of the technologies in Java space you might want to try to take a free online course from Sang Shin. The URL of the course is: and there's a lot of good materials provided without any need of registration in PDF format. The content is targeted mainly on the enterprise area, although you can find materials for other basic Java areas such as XML or JSP.

Pondělí XI 14, 2005

Nicer Looking NetBeans Deadlocks on Mustang

Although NetBeans 5.0 will officially support JDK 1.4 and 5, we are also testing it on JDK 6 so that when it's out NetBeans 5.0 will run on it seamlessly. I've switched for few days and JDK 6 for all my Java apps and I notice some very subtle differences which are harder to describe (I'll try to do so anyway).

I always thought that JDKs on Linux were a bit weaker - somehow less native and more buggy than on WinXP. With JDK6 this seems to improve. For example if I run NetBeans on JDK 6, the menu fonts look nicer. I was always irritated by slower response of the menus on the mouse movement and this seems to be better, too.

There were some very annyoing bugs in previous versions of JDK, like the random one where you could not type anything in a dialog because the input got frozen or several cursor-related bugs. These were fixed in Mustang. Overall the Java apps are a bit more responsive (or less freezing) and native behaving on Linux which is great.

True double-buffering is used now for drawing the UI so when the thread is busy you don't get gray image like before. Today I had a funny issue - you can always recognize a deadlock of the IDE by moving some app above it - the parts of the IDE where you move the app become gray. So although my IDE got stuck this didn't happen - I needed to bring a developer to my computer so that he could tell me that this really is a deadlock. It took me quite a while to figure out it's because of the double buffers that the IDE doesn't become gray. So I guess with Mustang we also have nicer looking deadlocks :-)

Neděle X 23, 2005

Beyond Java

I am now reading online a book from Bruce A. Tate called Beyond Java (I can recommend it). Bruce suggests the next "big" language will be more dynamic than Java. Java definitely has a long life ahead, but similarly as C and C++ one day there may come a language which will simply be more productive, with a new and thriving community. Some of the possible directions are sketched in this article on Obviously Java will be around for many years, similary as C and C++ is, but perhaps the JVM will have an even longer life.

Although I believe that Java is amazing in the way it can be used for all kinds of applications starting by client, through web, enterprise, mobility, ending by Mars Rover, it's universality may mean it's not top productive for some applications, such as simple webs with a database backend. It should not be a surprise that scripting languages can be more productive when writing small web apps, given their simplicity, dynamic typing, available frameworks, ease of deployment, etc.

As Bruce warns, Java is the dominant web language right now, but this may not last forever, so it's good to watch what is going on, also in the IDE space.

Sobota X 22, 2005

Javaposse - Weekly Podcasts about Java

It's really hard to orientate in all the Java news these days, just because there is so much happening. I found out that the Javaposse podcast provides a good aggregation moreover enriched by interesting opinions of Tor Norbye of Sun, Carl Quinn of Google and Dick Wall of New Energy. It continues the tradition of Javacast which died recently.

Pátek X 21, 2005

AWT and Swing Improvements in Mustang

Scott Violet visited Prague this week and he had a tech talk about improvements of AWT and Swing in Java SE 6 (Mustang). Some of these are pretty interesting and it wouldn't be me if I would not share the information (yes, I asked for permission first). Most of these features are already done, some are still being finalized for final release of Mustang.

Major news in AWT:
  • Desktop related APIs - these enable you to execute native actions such as to launch a browser, open a mail composer, open the file or print the file - all these actions are processed by applications which are associated with the file type. Thus you can easily print a PDF from Java using Adobe Acrobat.
  • Tray icon improvements - tray icon of your Java application becomes native-like, it gets a pop-up menu, tooltip, image and you can add listeners for various events.
  • Instant splash screen - a splash screen can be launched even before the VM machinery starts, it can be either specified on command line or launched programatically - and it can be dynamic (e.g. including a progress bar)
  • New modality API - modal dialogs are handeled in a better way - java help can be non-blocking, each document can have it's own modal dialogs, modal dialogs always stay on top, etc.
Major news in Swing:
  • Look and feel improvements - great look of Java on the upcoming Windows Vista and better GTK (with more general support for themes)
  • SwingWorker - utility which makes Swing threading easier, now a part of Swing
  • Layout enhancements - most of the stuff comes from Matisse - baseline support supported on almost all components
  • True double buffering - no more "gray rect" bug - the second buffer is used for repainting, so Java apps look more native
  • More: drag and drop enhancements, text printing with formatting, JTable sorting and filtering, tabs treated as components, etc.
Alltogether, there are many nice improvements for Java desktop applications. Scott has also shown us the APIs and they seem pretty simple to use. I hope that the AWT & Swing developers won't slow down, now that Swing is the dominant GUI toolkit - I hope to see even more in Java SE 7 - Dolphin.

Čtvrtek X 20, 2005

OpenOffice 2.0 Is Available!

OpenOffice 2.0 is available from!

The list of available features is quite large. But I think the most important "feature" is improved compatibility with Microsoft's formats which will enable wider spreading of OpenOffice and StarOffice. This is good because it will help drive usage of open document formats instead of the proprietary ones.

Did you know that OpenOffice is very Java-friendly? It has an SDK you can use to extend OpenOffice, OpenOffice can be embedded in a Java application. There are other reasons why to switch for example from a proprietary Office suite - I'm not saying which one, just any proprietary Office suite ;-)

Čtvrtek VII 07, 2005

Nice AJAX Demo

Check out especially Push (Ghost test) - shows how server pushes data to the client:

Pondělí VII 04, 2005

Scripting Support in Mustang - An Example You Can Try

Well, it's 1:30 a.m. but feels like late afternoon. Time shift is a funny thing. I thought that if I can't sleep, I could try to play with the new scripting support in Mustang (JSR-223). Well, it's as simple as this:

Preparing JavaScript code (notice I am using java.lang.StringBuffer inside JavaScript - isn't that cool?):

        input.setText("var out = new java.lang.StringBuffer();\\nfor (i=0; i<3; i++)\\n   
                                    out.append('hello, world! ('+i+')\\\\n');");

Executing the code:

	ScriptEngineManager manager = new ScriptEngineManager();
	ScriptEngine jsengine = manager.getEngineByName("js");
        try {
            String out = new String((StringBuffer)jsengine.get("out"));
        } catch (javax.script.ScriptException e) {
            output.setText("ScriptException" + e);

A screenshot:

Full source code is here. To execute, you need to install latest mustang build.

Well, if it's simple as this it may mean future Java code getting "polluted" by scripting code. Programming in scripting languages can be very productive for certain types of problems. Currently, Rhino JavaScript support is available by Sun as reference implementation and PHP support is being written, too. Any other languages may follow - the scripting framework enables any other languages to be plugged in. I really wonder what will be the impact of JSR 223 on web development...

Pátek IV 22, 2005

Sun Opens Doors for External Contributions to Java

In case you've missed it, take a look at:

Very good step, in my opinion. I hope it gets attention of the best-of-breed developers. It will probably be a big challenge to keep the compatibility, on the other hand the JDK team definitely has lots of experiences with keeping it, so it might work well. Our QA team will be thinking of you!


Roman Strobl


« červen 2016