Tuesday May 20, 2008

National Treasure should have been hidden using Java Card

After a stressful month of JavaOne, I am on vacation :) for a week and enjoying watching movies, and, Playing Super Mario Galaxy on Wii. The good thing about this vacation is - my wife has NO vacation, and, she is working :). My 52"" HD TV is all mine for this week, no competition. 

Just watched National Treasure 2 - Book of Secrets. I wonder if Java Card was used to hide these treasures, would the team be able to break it without having the Card? I should be saying IMPOSSIBLE, because ....................... I am working on Java Card ;-)

What the team might be doing? Let me guess .............. Create a card with just the gold contacts, connect wires to iPhone (?), and, just open the door by turning the iPhone. Its Hollywood, anything is possible. If you have seen the movie, you know what I am talking about. See how Riley hacks into buckingham palace :) -- Is it really that simple?

Sunday May 11, 2008

JavaOne 2008 Recap (3)

On Friday May 9th, JC3Bot contest was played in James Gosling's keynote. The two robots were played from two Java Card 3.0 Prototype cards. Winner was declared right there and he got the PS3 :). Laurent from Gemalto is there in the picture along with 2 final contestants, and, the other person is well known to every one :)


This was a great thing. Congratulations and Thanks to all Sun employees who worked on the Java Card 3.0 Reference Implementation, and preparing materials for Java One, and, all Gemalto team for making the prototype cards available for the attendees.

JavaOne 2008 Recap (2)

I gave a Technical Session in JavaOne with my colleague Bela Gangal, and, Eric VĂ©tillard of Trusted Labs. This is my first ever session in my life :). I guess we did fine. We demonstrated NetBeans plug-in at the end of the session.

 Me speaking

There were mostly JavaEE people. A few who knows Java Card. I think all the sessions will be available on the net very soon along with audio. If interested what Java Card 3 is all about, don;t forget to check out the material for "TS5940 Getting Started with Java Card 3.0 Platform".

JavaOne 2008 Recap (1)

It was really a hectic week. Didn't get time to blog while JavaOne is going on. Had to go to Mascone Center 2 days before JavaOne started :( to do the final round of testing. All the hard work is paid off. It definitely was a success event for Java Card 3. There was enough crowd participating in JC3Bot contest.

 Contest Booth


I am sure that the idea of Running Web Application from the card definitely raised some interest. If you missed this event, please go and check http://java.sun.com/javacard/contest page to download the Java Card Development kit. Hurry, it won;t be available after few days. This release is special for JavaOne event.


Monday Apr 28, 2008

Not An Architecture DiAgram

 Couldn't blog for the last 2 weeks. Too busy with JavaOne 2008 stuff. Wanted to get a nice(?) picture to explain what is there in Java Card 3 Platform. I asked our Director/Manager Eran Davidov to get me a nice picture. This is what he gave me. If you don't like it it is all his fault. If you like it, all credit goes to me :).

 This side picture is not an architecture diagram. Not even close to it. It just picturizes all new features of Java Card 3 Platform.

A little explanation. At the hardware level, Java Card stands on 32 bit processor and 24K of Volatile and 128K of No-Volatile. The strengths are JDK 6 and CLDC. The interfaces to and from the card are, USB, HTTP, SSL, Sockets .... all latest protocols. The application models are Servlets/Applets/SIOs ....

Hope you got it.

Tuesday Apr 15, 2008

Java Card 3.0 - Split VM, JDK 6

Java ME developers are aware of split VM architecture. In simple terms, Data Flow Analysis happens off the device. This is done by preverifier tool. Then, the byte code verification happens on the device using the information generated by preverifier tool. This information is stored in an attribute "StackMap" for each method's "Code".

Java Card 3.0 is adapting the same style. But with a different approach.

Since JDK6, the Java compiler generates preverified class files. There is a slight difference compared to Java ME style preverification. The first difference is the Attribute name itself. Attribute name in JDK6 generated class files is "StackMapTable". And the second difference is, "StackMapTable" is in compressed format compare to "StackMap". I am not going into details. You can check latest Class file format (JSR-202) for more details.

Java Card 3.0 is trying to leverage on JDK 6, so that the learning curve will be not so bumpy/steep/perpendicular :)

Monday Apr 14, 2008

Java Card 3.0 - Editions, Application Models

Before discussing any more about Java Card 3.0, I would like to clarify few things. Java Card 3.0 doesn't mean that Java Card 2.x is no longer available. Java Card 2.x is the most successful technology in Smart Card Industry. To continue evolving Java Card 2.x, and, at the same time to move on with Next Generation Java Card, the Java Card 3.0 has two editions. This post briefly describes what they are.

For you who are not aware of Java Card Applets, I would recommend to read the book  Java Cardâ„¢ Technology for Smart Cards by Zhiqun Chen

Java Card 3.0 will be available in two editions, Classic and Connected.

Java Card 3.0 Classic Edition

This is same as Java Card 2.x, which supports only JavaCard Applets. There might be some clarifications (or) bugfixes (or) some additional API. No change in application model. It still be JavaCard Applets, that needs to be converted into CAP files, and uses APDUs for communication.

Java Card 3.0 Connected Edition

This is the one we will be talking more about :).  Connected Edition supports three application models.

  • Classic Applets - These are same as Classic Applets. The difference is, no need to convert into CAP files.
  • Extended Applets - These are like Classic Applets, but supports full Java language and some additional API.
  • Servlet Applications - Servlet applications. Web Applications (war file) with Servlets 2.4 (some API is subsetted)

Thats all in very brief. Unless it is specified, I will be blogging about Java Card 3.0 Connected Edition only. It is too lengthy to type, so I'll just be typing Java Card 3.0 :).

I hope you observed that unlike JavaCard 2.x, there is no need to convert into CAP file format in JavaCard 3.0. This is because, Java Card 3.0 can handle class files, and, the best part of it is, you can write programs utilizing all new Java Language feature like Generics, Annotations, Enums, auto-boxing, for-each loops ... everything as of JDK6. In fact, Java Card 3.0 Connected Edition requires JDK 6.

More about the language support and other technical details in later posts.

Monday Apr 07, 2008

Getting Ready for JavaOne 2008

Exactly one month to JavaOne 2008. Our team is Getting ready to demonstrate few exciting Java Card 3.0 stuff in JavaOne 2008. Don't miss it. You will get to see some cool stuff about Java Card 3.0. There will be a Contest to develop Java Card 3.0 Servlet Application(s).

If you were there at JavaOne 2007, you might have seen the Gemalto card in action. This year, more surprising things. Don't miss to visit Java Card booth.

I'll post what will be there at JavaOne 2008, later this month.

Sunday Apr 06, 2008

Servlet Container in your Pocket

You thought only Laptops and Dekstops can run Servlet container? If so, you are wrong. Java Card 3.0 Connected Edition, the Next Generation Java Card, has Servlet container in it.

What does that mean for us? It means, now we can deploy a Servlet application on the Java Card, and, access the application using regular HTTP clients, like Web Browser. Yes, after so many years, Java Card is getting more memory and processor power (More details in later posts) to run Servlet container.

Any Servlet application (No JSPs) will run on Java Card with some limitations (More about limitation in later posts).

 A typical Servlet application consists of

  • One or more Servlet classes
  • web.xml to provide meta information about this application
  • Some static HTML pages
  • Optional MANIFEST.MF file

packaged into war file. 

This application can be deployed onto Java Card 3.0 Connected Edition. Few modifications are required, because Java Card 3.0 Connected Edition supports two other Application models called Extended Applets and Classic Applets, so, it needs to know about what we are deploying.

Java Card 3.0 Specifications were released on Mar 31, 2008. Click here to get the specs.

There are lots of new things about Java Card 3.0.  Keep watching for more details about it.


Everything you want to know about Java Card


  • Java Card 3.0
« July 2016