20050801 lundi août 01, 2005

EID : Yet Another JVM...

Yet another JVM that will carry in my wallet all the time! As any Belgian citizen has (or will soon), I have received my new Electronic Identity Card (EID). Belgium is the first large-scale deployment of electronic identity card in Europe. But there is little known fact about this deployment, the Belgian EID is based on Java Card technology! It uses an Axalto (formerly known as SchlumbergerSema) CryptoFlex 32K Java Card. So now, even my grandmother will use, in some way, a Java based technology!
My EID picture does not look to good; this is due to several factors:
  • The various security features used on the EID doesn't look too good when pictured (obviously!): Rainbow & guilloche printing, Changeable Laser Image, Optical Variable Ink, Alpha gram, relief and UV printing, Laser engraving.
  • Me! I was rushing to bring my picture and papers to the City Hall before going to a meeting 100Km away. And it is never a good idea considering that I will now have to live with this 'just-out-of-shower' picture for the next 5 years!
Deploying smart cards at a country scale, even for Belgium, is certainly not the easiest task on earth! Considering that the EID concept has been approved by the Belgian Council of Ministers in July 2001 and that the nation-wide roll-out was only started less than a year ago (end September 2004), that the deployment is a complex process that involves national (ex. National Register) and local entities (municipalities); it looks like the EID rollout is going well. Danny De Cock's godot.be monitor the EID deployment; Danny is using CRLs (Certificate Revocation List) to gather information about activated cards, active cards, cards waiting to be activated, revoked cards. And as of yesterday, there were 825.470 active cards, mine excluded.
Several Sun products already have some sort of support for the Belgian EID: Solaris 10, SunRay, Java Desktop System, Sun Java System Access Manager. When time permit, I will blog more about some of those, EID daily uses but also EID from a Java point of view. Tags: ( août 01 2005, 08:30:20 AM PDT ) Permalink Comments [2]
20050729 vendredi juillet 29, 2005

Planarity is addictive!

Planarity is an addictive mind puzzle web based game around Planar Graph. Tags: puzzle ( juil. 29 2005, 08:08:17 AM PDT ) Permalink Comments [3]
20050727 mercredi juillet 27, 2005

Dear Jeff

Dear Jeff, I am a big fan of your company. In fact, I buy all my English books on Amazon. But I do have 2 remarks. I am working in IT and in this industry we do care about the 'out-of-the-box' experience. Let me share a tip. It would be great if you could package the books in a better way. Books are relatively fragile items and shippers are creative people. I have a few concerns when I received an Amazon box where books can be seen from the outside of the box! Even worse, I don't really appreciate when you can pick books out of this box without opening this same box! By opening, I really mean without altering or damaging the so-called box! By the way, the box is this giant soft Amazon logo holder. The last remark is about the 'usually ships within 24 hours' availability tag. I think your IT system has a small bug. And it should adapted to "usually ships within 24 hours once Amazon will bother to look at your order and that can take 10 days". Again, shippers are creative people; do not assume that 'express delivery' will be close to something that is fast. Other than that Amazon is great! Sincerely, --David
Tag: ( juil. 27 2005, 11:34:55 PM PDT ) Permalink Comments [2]
20050720 mercredi juillet 20, 2005

JavaOne slides are available

The JavaOne 2005 slides are now available . It is free, once again! The rest (audio, transcript) should be made available later in the summer. Tags: ( juil. 20 2005, 03:24:21 AM PDT ) Permalink Comments [0]

Dtrace on Mustang

Mustang (Java SE 6) will come with Dtrace support built-in but right now the situation is a bit tricky. First of all, Dtrace is a Solaris 10 feature, so you need either Solaris 10 or OpenSolaris, nothing older and by the way both are free! dtrace -l gives the list of available probes, that's a long list. It varies from setup to setup, on my system it is more than 38.000 available probes! It is easier to use dtrace ---l | wc -l, which only gives the number of available probes (+1 as there is a header). If you browse Mustang source tree, you will find Dtrace probes in the code but also some .d files, which are used to define probes. So, it is clear, current Mustang build already have some sort of Dtrace support built-in (again, on Solaris 10 only) Now, if you use one of the latest Sparc Mustang EA build and if you count the number of available probes while the JVM is running and not running, you will see that you get the same number of probes. That clearly means that the JVM doesn't have any probes. At first, I though that maybe Dtrace support has to be activated by using a JVM param. switch. I browsed in the Mustang tree, and couldn't really find anything about this. So probes should be available by default, which make sense as probes doesn't add overhead. You want them all the time, even in production. I can only thing about some high-grade security deployment where you would want to disable probes. So what is the trick to use the Mustang built-in probes? Well, it took me some time to figure this. The Mustang Solaris Build Instruction clearly says that Solaris 8 is the official build platform. And of course, Solaris 8 doesn't have Dtrace support! (*) So you have to build Mustang on Solaris 10 to get the Dtrace support. It took me a few hours, but I managed to go through the Mustang build process, and now have my own Solaris 10 Mustang build (based on b42 source tree). While the JVM is running (without any no specific JVM param.), counting the probes gives me an additional +- 500 probes!! To get the list of Java related probes, you either have to know provider name, probe name, etc. dtrace -l | grep hotspot or just do a diff of available probes with JVM off and JVM running, this should point you where to look at. dtrace -l > jvm_off.txt java -jar Java2Demo.jar dtrace -l > jvm_running.txt diff jvm_off.txt jvm_running.txt give :
... 7 hotspot_jni7001 libjvm.so jni_ReleaseLongArrayElements ReleaseLongArrayElements_entry 8 hotspot_jni7001 libjvm.so jni_GetLongArrayRegion GetLongArrayRegion_entry 9 hotspot_jni7001 libjvm.so jni_CallStaticObjectMethod CallStaticObjectMethod_return 10 hotspot_jni7001 libjvm.so jni_CallShortMethod CallShortMethod_return 11 hotspot_jni7001 libjvm.so jni_CallObjectMethodV CallObjectMethodV_return 12 hotspot_jni7001 libjvm.so jni_CallNonvirtualIntMethod CallNonvirtualIntMethod_entry 13 hotspot_jni7001 libjvm.so jni_IsSameObject IsSameObject_return 14 hotspot_jni7001 libjvm.so jni_GetDoubleArrayElements GetDoubleArrayElements_entry 15 hotspot_jni7001 libjvm.so jni_GetDirectBufferAddress GetDirectBufferAddress_return 16 hotspot_jni7001 libjvm.so jni_SetFloatArrayRegion SetFloatArrayRegion_return ...
Check here for the list of probes in build 42. Keep in mind that it is evolving, things can be added or dropped! Note that Mustang for Solaris x64 is built on Solaris 10 so the EA Mustang build on this platform have out-of-the-box Dtrace support! No need to build your own Sol10 build! And keep in mind that JVM-TI agent based approach should also work on JDK 6.0 EA JVM (JVM-PI is not supported above JDK 5.0) (*) According to Kelly, work is ongoing to be able to compile Dtrace probes on Solaris 8 (it is compiling Dtrace on Sol8, and not using Dtrace on Sol8!) Tags: ( juil. 20 2005, 02:04:09 AM PDT ) Permalink Comments [0]
20050717 dimanche juillet 17, 2005

The ultimate keyboard

A Russian design company is working on what looks like to be the ultimate keyboard... if it ever reaches the market! They are using display embedded in keys (will probably be based on OLED display). Each display keys can then be customized (specific locale, animation, custom key, etc). They have even introduced the concept of key saver (a key's screen saver!).
Their plans are still vague, it might be released in 2006 and should cost less than a high-end mobile phone. So if this is not a hoax, that keyboard would be the definitive cure for my keyboard madness! Tags: ( juil. 17 2005, 04:00:27 AM PDT ) Permalink Comments [3]
20050712 mardi juillet 12, 2005

GlassFish : it works!

One of the clear benefit of Open Source is that smart people can easily contribute by tracking down issues, by proposing fixes. Here is an abstract of a mail I received yesterday from a partner (Excutive summary version - technical gorry details skipped)
David, I think I ran into a bug that is in glassfish. As I told you previously, we had problems with binding the HTTP-listener ... Using the source of glassfish, I could trace the problem to the following: upon startup, the appserver will call ASLazyKernel.setupSocketListeners()... The problem is that only the port-information is used here ... As a consequence, the HTTP-services are started at port 80 of 0.0.0.0 When the HTTP-service itself is initialized later ... Since the given address now contains a specific address, the check returns false, and a new ServerSocket will be created ... which results in an error since 0.0.0.0:80 is already bound. I fixed this in my tree by removing the lazy startup and it works fine now. I assume other people have this problem too (I'm running on Linux), so maybe this can help?
so less than 2 weeks after the annoucement, it seems that GlassFish (Sun's Open Source Java EE 5 Application Server) is on track and people start contributing! Tags : ( juil. 12 2005, 12:08:07 AM PDT ) Permalink Comments [0]
20050707 jeudi juillet 07, 2005

JConsole and JMX on Mac

There seems to be some confusion about the (un)availability of JConsole on Mac OSX 10.4. This post on Apple Java developer list should clarify the situation. Tags : ( juil. 07 2005, 03:25:59 AM PDT ) Permalink Comments [0]

GIS, mapping & Open Source

Geographical Information Systems (GIS) is not a new technology, it is now clearly a mainstream technology. There are probably serveral reasons for that. GIS devices are affordable : GPS are getting cheaper and cheaper. For example, it is now difficult to buy a car without a built-in GPS. GIS based services are useful and popular : Who would be able to live without Google maps or Map Quest ? GIS devices are more and more open : Some GPS have their own SDK. Some Java ME phones are location aware and provides a location API. This democratisation and openness of GIS leads to several Open Souce efforts including a WFS J2EE based server. Usualy, looking at newly published books of mainstream IT publisher always gives some trends. Here are 3 books from 2 publishers (O'Reilly & A Press) that will be published this month: This also confirm this GIS/democratisation/Open Source trends (and market). Now to the trikcy questions... who owns most of the data and who control the mostly used system ? Tags : ( juil. 07 2005, 12:10:40 AM PDT ) Permalink Comments [0]
20050706 mercredi juillet 06, 2005

JavaPolis

JavaOne is now over, let's now move on to JavaPolis, the most ambitious European Java conference.
< disclaimer!>
If you enjoy belgian humour, check this year JP theme which has just been announced.
< /disclaimer!>
... and beleive me, this theme is softer than the initial drafts! ;-) Tag : ( juil. 06 2005, 05:09:56 AM PDT ) Permalink Comments [0]
20050704 lundi juillet 04, 2005

On Device Debugging

Since I saw this entry on James Gosling blog (November 04), I have always been puzzled by the ability to debug J2ME application running a mobile phone. Most of the time, you need to do the final debugging on the target device, as emulators are generally more tolerant than the real device. On Device Debugging (ODD) has always been very tricky. For example, in the Digital TV world, some development MHP Set-Top boxes provides some sort of debugging capabilities. It works by connecting a terminal emulator to the STB serial port. This approach is very limited in terms of capabilities; it only provides very few limited JVM observations capabilities. Debugging means you have to run an 'enhanced' version of your application (the same application with a bunch of System.out.println("what the hell am I doing in this method?"); statements. There is no transparent way to easily poke variables. Needless to say that debugging your code, step-by-step, is not an option with that approach. This also exclude any IDE based debugger integration. The only positive point about this method is that you may have access to lower level events (ex. signaling information, HW events like smart card removal, etc) This method is proprietary but does work... it was anyway the only one available. Most of the times, debugging capabilities are disabled on production set-top box. Before that, it was even worst and more complex. Debugging could only be done on modified STB with some specific hardware hooks (JTAG, PCMCIA, SCSI or some other exotic interfaces). This approach was even more complex but also very fragile. That was really a hack! So being able to debug J2ME application running on a device from the IDE is really a huge step forward! For that, you need need NetBeans 4.1, Mobility pack but also the latest Sony Ericsson SDK. The SE SDK will act as a proxy between the mobile and NetBeans, the connection will be bluetooth based. According the SE SDK release note, it seems that cable, and infrared are also supported. Unfortunately, the SDK release notes clearly says that Symbian based phones do not support ODD! Too bad, as a lot of Java Geeks, I have a SE PE910, which is based on Symbian! So that won't work on my phone! I need to find another phone that support ODD! In fact, only the high-end SE smart phones (PE 910, 900, etc) do not support ODD! :-( Anyway, I have looked on how to configure NetBeans for this. It looks to be straightforward. To configure NetBeans, you need just need to add the SE SDK as a specific J2ME Java Platform "Tools", "Java Platform Manager", "Add Platform".
Configure your Java ME project to use this new platform.
You should configure the SE proxy to use Bluetooth connection. When developing your Midlet, just select this platform, and the hit the usual Debug button (F5), and you should be done!
I was not able to test this yet, I only saw demos of this method last week at JavaOne. It was over Bluetooth, you can feel a small lag but that seems to be pretty acceptable! This is On Device Debugging from the IDE not from a close specific debugging application, and the target is a production device not a develoment one!!! Again, I wasn't able to test but I'll try to get my hands on a supported Sony Ericsson phone to give it a real try. Tags : ( juil. 04 2005, 11:15:02 PM PDT ) Permalink Comments [1]
20050702 samedi juillet 02, 2005

Project Jackpot and Software Archeology

Eric Amstrong has posted on Artima an entry on Tom Ball's J1 talk on Jackpot Project aka Refactoring on Steroids (another baby of James Gosling). Jackpot isn't new but finaly, this SunLabs research will land somewhere! As Tom said, Jackpot is being integrated in NetBeans, and should be made available in the coming month. That's a really good news. In short, Jackpot gives the ability to deeply dig in existing code bases (software archeology) to find errors, bad patterns, etc. Jackpot can also do safe custom code refactoring by using its own pattern matching language. The nice thing about about Jackpot is its speed. By heavily relying on javac itself Jackpot is really fast. And last, Jackpot can also be used for more advanced things like software reegineering (ex. migrating APIs). Tags : ( juil. 02 2005, 11:09:34 PM PDT ) Permalink Comments [0]
20050701 vendredi juillet 01, 2005

Ultra 20 - another divide

Yesterday, I have done my proctor duty for J1's Hands-on Labs. It was a lot of fun but I have to admit, we have been unfair! There were roughly 100 workstations. About half of the room was using brand new Ultra 20, while the other half was using good old Blade 150. Sometime, people from the other side (the Blade 150 side) were complaining because it was not balzing fast. Well... compiling, packaging, deploying a J2EE application, then launching the browser to test the same application, then JSP gets compiled on the first request... can easily takes 6 to 10 seconds on a Blade 150, that's normal. On the other side (the Ultra 20 side), I never had any complaints about the performance. Doing the same things... takes less than 2 seconds! (sometime, it was even under the second!!) That's what I call performance! Again, that was unfair for the other side... just another divide, sorry for the Blade 150 side! Tags: ( juil. 01 2005, 11:43:51 AM PDT ) Permalink Comments [0]
20050630 jeudi juin 30, 2005

JavaOne content availability...

I frequently get questions about availability of the JavaOne content (what, when, where, and how much). This year it will be easy.
- What : all technical sessions (audio synced with slides, and transcripts)
- When : around end of August
- Where : Sun Developer Network
- How much : free for SDN members (free registration!)
And if you're impatient, PDFs will be available in about 2 or 3 weeks from now on java.sun.com/javaone! Hands-on labs will also be available later in the month. In the meantime, a few will be made available in the following days on javapassion.com. Tag: ( juin 30 2005, 12:52:12 PM PDT ) Permalink Comments [0]

Matisse and the new layout manager

After the Matisse BoF (NetBeans new GUI builder); I had a TexMex lunch with Alexis. The Corona discussion was around Matisse and the new layout manager that was co-developped by the Swing team and the NetBeans team. It seems that a few people were complaining because this new layout manager introduce "a new dependency"!? I have just checked, the current release is less than 100k; so that is just an additional small jar, what's the problem with that? Who can't afford this? So I was wondering about the license, maybe the license used was not very friendly to some people... but it is LGPL! There should be no problem with the license. So clearly, there is no reason to not use it now! If everything goes well, this layout manager should land in a future version JDK. Just try to out Matisse to see how this layout manager combined with a nice GUI builder really help a lot to create nice looking GUI in Java. Tags: ( juin 30 2005, 12:03:09 AM PDT ) Permalink Comments [0]