Planet Classpath

Sad to receive news this morning that a long time friend and colleague, Peter Miller, had passed.

Peter Miller

“After fighting cancer for many years, finally lost”. No, not lost; if there was ever anyone who fought the battle of life and won it was be Peter. Even knowing he was at his last days he was unbowed. Visiting him last week he proudly showed us the woodworking plans and cut lists for some cabinets he was making for his wife MT. He had created the diagrams himself, writing C++ code to call manually drive a drawing library, outputting postscript. Let’s see you do architectural drawing without a CAD program. The date on the printout was two weeks ago.

“The world is a less interesting place today,” wrote another friend. No. Peter firmly believed that interest comes from within. The world is there to be explored, I can hear him saying. He taught us to go forth, wonder, and understand. And so we should.


The IcedTea project provides a harness to build the source code from OpenJDK using Free Software build tools, along with additional features such as a PulseAudio sound driver, the ability to build against system libraries and support for alternative virtual machines and architectures beyond those supported by OpenJDK.

This release updates our OpenJDK 7 support in the 2.4.x series with the July 2014 security fixes.

Please note that this will be the *FINAL* release in the 2.4.x series. Users are encouraged to upgrade to the 2.5.x series as soon as possible. There will NOT be a 2.4.x update for the October 2014 security fixes.

If you find an issue with the release, please report it to our bug database under the appropriate component. Development discussion takes place on the distro-pkg-dev OpenJDK mailing list and patches are always welcome.

Full details of the release can be found below.

What’s New?

New in release 2.4.8 (2014-07-23)

  • Security fixes
  • Backports
    • S5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
    • S6571600: JNI use results in UnsatisfiedLinkError looking for
    • S7131153: GetDC called way too many times – causes bad performance.
    • S7190349: [macosx] Text (Label) is incorrectly drawn with a rotated g2d
    • S8001108: an attempt to use “<init>” as a method name should elicit NoSuchMethodException
    • S8001109: arity mismatch on a call to spreader method handle should elicit IllegalArgumentException
    • S8008118: (process) Possible null pointer dereference in jdk/src/solaris/native/java/lang/UNIXProcess_md.c
    • S8013611: Modal dialog fails to obtain keyboard focus
    • S8013809: deadlock in SSLSocketImpl between between write and close
    • S8013836: getFirstDayOfWeek reports wrong day for pt-BR locale
    • S8014460: Need to check for non-empty EXT_LIBS_PATH before using it
    • S8019853: Break logging and AWT circular dependency
    • S8019990: IM candidate window appears on the South-East corner of the display.
    • S8020191: System.getProperty(“”) returns “Windows NT (unknown)” on Windows 8.1
    • S8022452: Hotspot needs to know about Windows 8.1 and Windows Server 2012 R2
    • S8023990: Regression: postscript size increase from 6u18
    • S8024283: 10 nashorn tests fail with similar stack trace InternalError with cause being NoClassDefFoundError
    • S8024616: JSR292: lazily initialize core NamedFunctions used for bootstrapping
    • S8024648: 7141246 & 8016131 break Zero port (AArch64 only)
    • S8024830: SEGV in org.apache.lucene.codecs.compressing.CompressingTermVectorsReader.get
    • S8025588: [macosx] Frozen AppKit thread in 7u40
    • S8026404: Logging in Applet can trigger ACE: access denied (“java.lang.RuntimePermission” “modifyThreadGroup”)
    • S8026705: [TEST_BUG] java/beans/Introspector/ failed
    • S8027196: Increment minor version of HSx for 7u55 and initialize the build number
    • S8027212: java/nio/channels/Selector/ fails intermittently
    • S8028285: RMI Thread can no longer call out to AWT
    • S8029177: [Parfait] warnings from b117 for JNI exception pending
    • S8030655: Regression: 14_01 Security fix 8024306 causes test failures
    • S8030813: Signed applet fails to load when CRLs are stored in an LDAP directory
    • S8030822: (tz) Support tzdata2013i
    • S8031050: (thread) Change Thread initialization so that thread name is set before invoking SecurityManager
    • S8031075: [Regression] focus disappears with shift+tab on dialog having one focus component
    • S8031462: Fonts with morx tables are broken with latest ICU fixes
    • S8032585: JSR292: IllegalAccessError when attempting to invoke protected method from different package
    • S8032740: Need to create SE Embedded Source Bundles in 7 Release
    • S8033278: Missed access checks for Lookup.unreflect* after 8032585
    • S8034772: JDK-8028795 brought a specification change to 7u55 release and caused JCK7 signature test failure
    • S8035283: Second phase of branch shortening doesn’t account for loop alignment
    • S8035613: With active Securitymanager JAXBContext.newInstance fails
    • S8035618: Four api/org_omg/CORBA TCK tests fail under plugin only
    • S8036147: Increment hsx 24.55 build to b02 for 7u55-b11
    • S8036786: Update jdk7 testlibrary to match jdk8
    • S8036837: Increment hsx 24.55 build to b03 for 7u55-b12
    • S8037012: (tz) Support tzdata2014a
    • S8038306: (tz) Support tzdata2014b
    • S8038392: Generating prelink cache breaks JAVA ‘jinfo’ utility normal behavior
    • S8042264: 7u65 l10n resource file translation update 1
    • S8042582: Test java/awt/KeyboardFocusmanager/ChangeKFMTest/ChangeKFMTest.html fails on Windows x64
    • S8042590: Running form URL throws NPE
    • S8042789: org.omg.CORBA.ORBSingletonClass loading no longer uses context class loader
    • S8043012: (tz) Support tzdata2014c
  • Bug fixes
    • Fix accidental reversion of PR1188 for armel
    • PR1781: NSS PKCS11 provider fails to handle multipart AES encryption
    • PR1830: Drop version requirement for LCMS 2
    • PR1833, RH1022017: Report elliptic curves supported by NSS, not the SunEC library
    • RH905128: [CRASH] OpenJDK-1.7.0 while using NSS security provider and kerberos
  • AArch64 port
    • AArch64 C2 instruct for smull
    • Add a constructor as a conversion from Register – RegSet. Use it.
    • Add RegSet::operator+=.
    • Add support for a few simple intrinsics
    • Add support for builtin crc32 instructions
    • Add support for CRC32 intrinsic
    • Add support for Neon implementation of CRC32
    • All address constants are 48 bits in size.
    • C1: Fix offset overflow when profiling.
    • Common frame handling for C1/C2 which correctly handle all frame sizes
    • Correct costs for operations with shifts.
    • Correct OptoAssembly for prologs and epilogs.
    • Delete useless instruction.
    • Don’t use any form of _call_VM_leaf when we’re calling a stub.
    • Fast string comparison
    • Fast String.equals()
    • Fix a tonne of bogus comments.
    • Fix biased locking and enable as default
    • Fix instruction size from 8 to 4
    • Fix opto assembly for shifts.
    • Fix register misuse in verify_method_data_pointer
    • Fix register usage in generate_verify_oop().
    • Implement various locked memory operations.
    • Improve C1 performance improvements in ic_cache checks
    • Improve code generation for pop(), as suggested by Edward Nevill.
    • Improvements to safepoint polling
    • Make code entry alignment 64 for C2
    • Minor optimisation for divide by 2
    • New cost model for instruction selection.
    • Offsets in lookupswitch instructions should be signed.
    • Optimise addressing of card table byte map base
    • Optimise C2 entry point verification
    • Optimise long divide by 2
    • Performance improvement and ease of use changes pulled from upstream
    • Preserve callee save FP registers around call to java code
    • Remove obsolete C1 patching code.
    • Remove special-case handling of division arguments. AArch64 doesn’t need it.
    • Remove unnecessary memory barriers around CAS operations
    • Restore sp from sender sp, r13 in crc32 code
    • Restrict default ReservedCodeCacheSize to 128M
    • Rewrite CAS operations to be more conservative
    • Save intermediate state before removing C1 patching code.
    • Tidy up register usage in push/pop instructions.
    • Tidy up stack frame handling.
    • Use 2- and 3-instruction immediate form of movoop and mov_metadata in C2-generated code.
    • Use an explicit set of registers rather than a bitmap for psh and pop operations.
    • Use explicit barrier instructions in C1.
    • Use gcc __clear_cache instead of doing it ourselves

The tarballs can be downloaded from:

We provide both gzip and xz tarballs, so that those who are able to make use of the smaller tarball produced by xz may do so.

The tarballs are accompanied by digital signatures available at:

These are produced using my public key. See details below.

SHA256 checksums:

  • 5bb6ece0ca8f2022056a2e455330c5324d1c110b278dbf5af5e9d48babebcd40 icedtea-2.4.8.tar.gz
  • 59b280c9d342db45c3f810bfdf002806f14faabac1c7fd5c6d2c28cecd13f9d2 icedtea-2.4.8.tar.gz.sig
  • 3fa64e2e92b08fb69eaec72a85ee3322efb1cfacc65e15b5b7fdef4abbdd17a2 icedtea-2.4.8.tar.xz
  • 60c060fa3e438f338128f616f7b8d23ff15d5642e8d1547bb7e026121e7affc8 icedtea-2.4.8.tar.xz.sig

The checksums can be downloaded from:

A 2.4.8 ebuild for Gentoo is available.

The following people helped with these releases:

We would also like to thank the bug reporters and testers!

To get started:

$ tar xzf icedtea-2.4.8.tar.gz


$ tar x -I xz -f icedtea-2.4.8.tar.xz


$ mkdir icedtea-build
$ cd icedtea-build
$ ../icedtea-2.4.8/configure
$ make

Full build requirements and instructions are available in the INSTALL file.

Happy hacking!

For a while now a number of Mozillians have been discussing the need for some sort of technical training on Gecko and other Mozilla codebases. A few months ago, Vlad and I and a few others came up with a plan to try out a “bootcamp”-like event. We initially thought we’d have non-core developers learn from more senior developers for 4 days and had a few goals:

  • teach people not developing Mozilla code daily about the development process
  • expose Mozillians to areas with which they’re not familiar
  • foster shared ownership of areas of code and tools
  • teach people where to look in the code when they encounter a bug and to more accurately file a bug (“teach someone how to fish”)

While working towards this we realized that there isn’t as much shared ownership as there could be within Mozilla codebases so we focused on 2 engineering teams teaching other engineers. The JavaScript and Graphics teams agreed to be mentors and we solicited participants from a few paid Mozillians to try this out. We intentionally limited the audience and hand-picked them for this first “beta” since we had no idea how it would go.

The event took place over 4 days in Toronto in early June. We ended up with 5 or 6 mentors (the Graphics team having a strong employee presence in Toronto helped with pulling in experts here and there) and 9 attendees from a variety of engineering teams (Firefox OS, Desktop, and Platform).

The week’s schedule was fairly loose to accommodate questions and make it more of a conversational atmosphere. We planned sessions in an order to give a high level overview followed by deeper dives. We also made sessions about complementary Gecko components happen in a logical order (ex. layout then graphics). You can see details about the schedule we settled upon here:

We collaboratively took notes and recorded everything on video. We’re still in the process of creating usable short videos out of the raw feeds we recorded. Text notes were captured on this etherpad which had some real-time clarifications made by people not physically present (Ms2ger and others) which was great.

The week taught us a few things, some obvious, some not so obvious:

  • people really want time for learning. This was noted more than once and positive comments I received made me realize it could have been held in the rain and people would have been happy
  • having a few days set aside for professional development was very much appreciated so paid Mozillians incorporating this into their goals should be encouraged
  • people really want the opportunity to learn from and ask questions of more seasoned Mozilla hackers
  • hosting this in a MozSpace ensured reliable facilities, flexibility in terms of space, and the availability of others to give ad hoc talks and answer questions when necessary. It also allowed others who weren’t official attendees to listen in for a session or two. Having it in the office also let us use the existing video recording setup and let us lean on the ever-amazing Jonathan Lin for audio and video help. I think you could do this outside a MozSpace but you’d need to plan a bit more for A/V and wifi, etc.
  • background noise (HVAC, server fans, etc.) is very frustrating for conversations and audio recording (but we already knew this)
  • this type of event is unsuitable for brand new {employees|contributors} since it’s way too much information. It would be more applicable after someone’s been involved for a while (6 months, 1 year?).

In terms of lessons for the future, a few things come to mind:

  • interactive exercises were very well received (thanks, kats!) and cemented people’s learning as expected
  • we should perhaps define homework to be done in advance and strongly encourage completion of it; videos of previous talks may be good material
  • scheduling around 2 months in advance seemed to be best to balance “I have no idea what I’ll be doing then” and “I’m already busy that week”
  • keeping the ratio of attendees to “instructors” to around 2 or 3 to 1 worked well for interactivity and ensuring the right people were present who could answer questions
  • although very difficult, attempting to schedule around major deadlines is useful (this week didn’t work for a few of the Firefox OS teams)
  • having people wear lapel microphones instead of a hand-held one makes for much better and more natural audio
  • building a schedule, mentors, and attendee list based on common topics of interest would be an interesting experiment instead of the somewhat mixed bag of topics we had this time
  • using whiteboards and live coding/demos instead of “slides” worked very well

Vlad and I think we should do this again. He proposed chaining organizers so each organizer sets one up and helps the next person do it. Are you interested in being the next organizer?

I’m very interested in hearing other people’s thoughts about this so if you have any, leave a comment or email me or find me on IRC or send me a postcard c/o the Toronto office (that would be awesome).

We are pleased to announce the release of IcedTea-Sound 1.0.1… after finding that IcedTea-Sound 1.0.0 was a little broken :(

If you find an issue with the release, please report it to our bug database under the appropriate component. Development discussion takes place on the distro-pkg-dev OpenJDK mailing list and patches are always welcome.

Full details of the release can be found below.

What’s New?

New in release 1.0.1 (2014-07-18)

  • PR1877: Code not updated in accordance with name changes in PR1840

The tarballs can be downloaded from:

We provide both gzip and xz tarballs, so that those who are able to make use of the smaller tarball produced by xz may do so.

The tarballs are accompanied by digital signatures available at:

These are produced using my public key. See details below.

SHA256 checksums:

  • 71ba4ede06cfb9375c373c98191de2564cd32b925f5dffcd109a172a14d5e3db icedtea-sound-1.0.1.tar.gz
  • 9d9ff790a3012ce6bb47260906ff3512eea428ace94efc3969f8832f12c7a479 icedtea-sound-1.0.1.tar.gz.sig
  • 6ff852b82ae7db7a95981271037eb3a3d52c59581e3b27a638a7c6bc8eecb4a3 icedtea-sound-1.0.1.tar.xz
  • e8c4b0a6a02c7314ae47e5de79b6d00c93dbe7a9f66c2b5a1d78b837c6831161 icedtea-sound-1.0.1.tar.xz.sig

The checksums can be downloaded from:

A 1.0.1 ebuild for Gentoo is available.

The following people helped with these releases:

We would also like to thank the bug reporters and testers!

To get started:

$ tar xzf icedtea-sound-1.0.1.tar.gz


$ tar x -I xz -f icedtea-sound-1.0.1.tar.xz


$ mkdir its-build
$ cd its-build
$ ../icedtea-sound-1.0.1/configure –prefix=${install_location}
$ make
$ make install

where ${install_location} should be replaced by the prefix where you wish to install IcedTea-Sound (default is /usr/local). Depending on the prefix selected, the 'make install' step may need root privileges.

Full build requirements and instructions are available in the INSTALL file.

Happy hacking!

Yesterday's JDK 7u65 and 8u11 updates changed method overriding yet again and, of course, it is still broken.

Take this example:

package pkg1;

public class A {
  { foo(); }
  void foo() { System.out.println(""); }

package pkg2;

public class B extends pkg1.A {
  { foo(); }
  void foo() { System.out.println(""); }

package pkg1;

public class C extends pkg2.B {
  { foo(); }
  void foo() { System.out.println(""); }

package pkg2;

public class D extends pkg1.C {
  { foo(); }
  void foo() { System.out.println(""); }

public class test {
  public static void main(String[] args) {
    new pkg2.D();

Running this with JDK 8u5 yields:

Which is, of course, wrong. In yesterday's updates they tried to fix this, but only partially succeeded:

The sensible output would be:

In Februari I reported two Java vulnerabilities to Oracle. Yesterday they released the update that fixed them, so here are the descriptions of the two issues.


Internally, the JDK uses the LambdaForm.Compiled annotation to mark methods that should be skipped in a security stack walk. In JDK 7 it was possible to apply this annotation to untrusted code. Here's an example:

import java.lang.annotation.*;

@interface java_lang_invoke_LambdaForm$Compiled { }

class test {
  public static void main(String[] args) throws Throwable {

If you compile and run this with JDK 1.7.0_60 with a security manager, you get the appropriate AccessControlException. However, if you edit test.class to replace java_lang_invoke_LambdaForm with java/lang/invoke/LambdaForm and run it again, you see that the main method is now skipped in the security check and hence is allowed to access a privileged class.

The fix can be seen here.


This example demonstrates that the JDK 1.7.0_60 LambdaForm method handle implementation has a type safety bug when dealing with method signatures with the maximum number of parameters.

Project Jigsaw has, for the last several years, been in an exploratory phase in which we’ve designed and prototyped one particular approach to addressing a draft set of requirements.

It’s now time to switch gears and focus on creating a production-quality design and implementation suitable for JDK 9 and thence Java SE 9, as previously proposed.

To begin this phase I’ve drafted a new document to collect goals and requirements. It reflects a new emphasis on security, as motivated by recent experience, it takes into account lessons learned from the prototype, and it’s written at a broader and more abstract level than the previous document so as not to over-constrain the solution space. This document will be one of the starting points of the upcoming Java Platform Module System JSR.

Jigsaw as a whole will bring enormous changes to the JDK; it would be unwise to wait until it’s completely finished before merging any of it. Our intent, therefore, is to proceed in large steps, each of which will have a corresponding JEP. The first three JEPs will propose a specific modular structure for the JDK, reorganize the JDK source code (but not binaries) along those lines, and then later modularize the binary images.

A fourth JEP will introduce the module system itself, which will be aligned with the module-system JSR. It may seem odd that the module system JEP comes last, but the earlier JEPs need make only minimal assumptions about its capabilities, hence work on them can proceed in parallel with work on the module-system JEP and JSR.

Comments, questions, and suggestions are welcome on the jigsaw-dev mailing list. (If you haven’t already subscribed to that list then please do so first, otherwise your message will be discarded as spam.)

DataBasin, the clean-room impelmentation of a data extraction tool for available for GNUstep and Mac just made a big leap forward!

If you have ever done a SELECT in, you might have noticed that the results are not ordered and that semi-joined fields ("." notation) are handled strange because a whole object is returned.

DataBasin extracts the  columns of the CSV file by checking the first row of the dataset and recursing on the field names of salesforce's response. The effects in DataBasin are the following:
  • The field order is not preserved
  • If a sub-object is queried, all those fields are grouped together in that object
  • If more than one field is queried on a sub-object and on certain record this object is missing, the number of columns between records is inconsistent: doesn't return the whole object and DataBasin iterates record after record in the sub-object, but if it it is totally missing, only one empty column will be written, not as many as needed
  • Capitalization of the column names doesn't get preserved (compared to the above issues, something really minor)

I added a new option available in write out fields in the order of the query.

This feature implies a more complex under the hood. For each record gotten in the response, the field names are reconstructed as before (e.g. by recursing inside sub-objects) and put in a Dictionary.

The original SOQL query is parsed and the field names extracted, then these names are used as keys for each record dictionary and written out.
  • Order preserved, also with sub-objects
  • Fields preserved and empty values are written even if whole sub-objects are missing
  • Case is preserved
This approach looks fine and comes with a relatively small performance penalty, however it is delicate because during parsing of the query, many naming subtleties of needs to be inferred, that is, DataBasin tries to infer how the name in the Response will be:
  • field aliases
  • aggregate names with no alias, which are called progressively Expr0, Expr1
  • idiosyncrasies with aggregate functions. A field in a sub-objects is called Object__c.Field__c when in a regular query, but when used in an aggregate query, only Field__c is used, disregarding the join-depth
  • COUNT() vs.COUNT(Id)
I hope I have not missed any! in any case, enjoy!

This feature is available now both in Select and Select-Identify, since it is a problem of the CSV Write backend and enhances DataBasin operation usability greatly, bringing it on par with DataLoader.
Since DataLoader performces similar transformation and sometimes produces wrong results, I left this feature as optional with the flag "Write fields in query order".

There’s an interesting spectrum of events in the technical space. Conferences are the mainstay obviously; usually very intense and high-calibre thanks to the hard work of papers committees and of course the presenters themselves. You become invigorated hearing the experiences and results of other people, sharing ideas in the hallway, and of course the opportunity to vehemently explain why vi is better than emacs over drinks in the bar later is essential to the progress of science.

For a given community, though, conferences are relatively infrequent; often only once a year for a given country (, Australia’s annual Linux conference, say) and sometimes only once a year globally (ICFP, the international functional programming conference with numerous collocated symposiums and events taking advantage of the fact it’s the one event everyone turns up at is a notable example in computing).

More locally, those in major cities are able to organize monthly meetups, networking events, user groups, and the like. Which are fun; lovely to see friends and continue to build relationships with people you’d otherwise only see once a year.

Finally there are hackfests, often on the order of a weekend in duration. The tend to draw people in from a wide area, and sometimes are in an unusual milieu; Peter Miller’s CodeCon camping and hacking weekends are infamous in the Sydney Linux community; rent a small quiet generator, find a state forest, set up tents and hack on whatever code you want to for a few days. Blissful.

The local monthly events are the most common, though. Typically two or three people offer to give presentations to an audience of 30-50 people. And while hearing talks on a range of topics is invaluable, the fact that so many smart people are in the room passively seems a lost opportunity.

For a while now I’ve been musing whether perhaps there is something between meetups and hackfests. Wouldn’t it be cool to get a bunch of people together, put a problem on the board, and then for an hour go around the room and have a debate about whether the problem is even the right question to be asking, and different approaches to tackling the issue? Something short, relatively focused, and pragmatic; rather than being a presentation of results a consideration of approaches. If we do it in a bit of rotation, each time one person being tasked with framing the question, then over time participants each have the benefit of bringing the collective firepower of the group to bear on one of the problems they’re working.

Needs a name. Seminar? No, that’s what university departments do. Symposium? Too grand. Something more informal, impromptu, but organized. You know, like a jazz jam session. Ah, there we go: gonna call these sessions.

It might be nice to complement the monthly functional programming meetup (fp-syd) that happens in Sydney with something a little more interactive and Haskell focused. And as I’m looking to improve the depth of experience with Haskell in the Engineering group at Anchor, this seemed like a nice fit. So we’re holding the first of the Haskell Sessions tomorrow 2pm, at Anchor’s office in Sydney.

Here’s one to start us off:

Industrial code has to interact with the outside world, often on external dependencies such as databases, network services, or even filesystem operations. We’re used to the ability to separate pure code from that with side-effects, but what abstractions can we use to isolate the dependent code from the rest of the program logic?

I know we’re not the first ones to blunder in to this; I’ve heard plenty of people discussing it. So I’m going to hand around a single page with the type signatures of the functions involved at various points, freshly sharpen some whiteboard markers, and we’ll see what ideas come to light!

If you’re interested in coming, drop me a line.


Another company is refusing to issue a Java RIA code signing certificate for individual. Even if they openly declare they do in they website. Even after I provided the notary-confirmed copies of all documents they requested and they have had two phone interviews with me. Seems really the end of the project. Dalibor, are you reading this?


Here at Object Refinery we have built two products, JFreeChart and Orson Charts, that rely heavily on Java2D, specifically the Graphics2D API. Java2D is a great technology that isn't going away but, as everyone knows, the future of Java desktop development is JavaFX. For our clients already making the move to JavaFX, we want to make it as easy as possible for them to continue using JFreeChart and Orson Charts, and avoid having to significantly rework their code that produces charts and reports...but how?

There exists a JavaFX Canvas component which can be used to "draw" vector output in the same way as you do with Java2D but, unfortunately, Oracle chose not to provide a Graphics2D API for this component, instead opting for an API that is roughly equivalent to that used by the HTML5 Canvas. We decided to fix that.


Read on to find out how we did it, and in the process future-proofed JFreeChart and Orson Charts (and maybe your code too).


We've previously implemented the Graphics2D API targetting SVG output (JFreeSVG) and PDF (OrsonPDF) with great results, so we decided that a new Graphics2D implementation targetting the JavaFX Canvas would very likely solve our problem, minimising the disruption to our code, our clients' code, and also the cost of supporting both Java2D/Swing and JavaFX going forward.

FXGraphics2D is our shiny new bridge class that maps Java2D drawing calls directly to the equivalent JavaFX Canvas API methods. The code is small, fast, free (under a very liberal BSD-style license), and available now on GitHub. So far in our testing, the code performs well and generates high-quality output. Now with our first public release, we are looking forward to feedback from a diverse range of users.


There are a couple of demos included with the project on GitHub (one for JFreeChart and one for Orson Charts). The screenshot from the JFreeChart demo (with source code here) appears above.

The Orson Charts demo is larger and more interactive than what we have for JFreeChart so far. Here is a screenshot (we encourage you to download the code and try it out live, particularly to see the tooltip and mouse event support):



Faced with the problem of supporting JFreeChart and Orson Charts users wishing to migrate to JavaFX, we've created FXGraphics2D, a small, fast, elegant and free solution that bridges the divide between Java2D and JavaFX.

The original source version of this blog entry is at

I wrote a quick fuzzer for libiberty’s demangler this morning. Here’s how to get and use it:

$ mkdir workdir
$ cd workdir
$ git clone src
$ cd src
$ git co demangler
$ cd ..
$ mkdir build
$ cd build
$ CFLAGS="-g -O0" ../src/configure --with-separate-debug-dir=/usr/lib/debug
$ make
$ ../src/ 
+ /home/gary/workdir/build/fuzzer
../src/ line 12: 22482 Segmentation fault      (core dumped) $fuzzer
# copy the executable and PID from the two lines above
$ gdb -batch /home/gary/workdir/build/fuzzer core.22482 -ex "bt"
Core was generated by `/home/gary/workdir/build/fuzzer'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000000000040d5f2 in op_is_new_cast (op=0x7ffffac19930) at libiberty/cp-demangle.c:3064
3064	  const char *code = op->u.s_operator.op->code;
#0  0x000000000040d5f2 in op_is_new_cast (op=0x7ffffac19930) at libiberty/cp-demangle.c:3064
#1  0x000000000040dc6f in d_expression_1 (di=0x7ffffac19c90) at libiberty/cp-demangle.c:3232
#2  0x000000000040dfbc in d_expression (di=0x7ffffac19c90) at libiberty/cp-demangle.c:3315
#3  0x000000000040cff6 in d_array_type (di=0x7ffffac19c90) at libiberty/cp-demangle.c:2821
#4  0x000000000040c260 in cplus_demangle_type (di=0x7ffffac19c90) at libiberty/cp-demangle.c:2330
#5  0x000000000040cd70 in d_parmlist (di=0x7ffffac19c90) at libiberty/cp-demangle.c:2718
#6  0x000000000040ceb8 in d_bare_function_type (di=0x7ffffac19c90, has_return_type=0) at libiberty/cp-demangle.c:2772
#7  0x000000000040a9b2 in d_encoding (di=0x7ffffac19c90, top_level=1) at libiberty/cp-demangle.c:1287
#8  0x000000000040a6be in cplus_demangle_mangled_name (di=0x7ffffac19c90, top_level=1) at libiberty/cp-demangle.c:1164
#9  0x0000000000413131 in d_demangle_callback (mangled=0x7ffffac19ea0 "_Z1-Av23*;cG~Wo2Vu", options=259, callback=0x40ed11 , opaque=0x7ffffac19d70)
    at libiberty/cp-demangle.c:5862
#10 0x0000000000413267 in d_demangle (mangled=0x7ffffac19ea0 "_Z1-Av23*;cG~Wo2Vu", options=259, palc=0x7ffffac19dd8) at libiberty/cp-demangle.c:5913
#11 0x00000000004132d6 in cplus_demangle_v3 (mangled=0x7ffffac19ea0 "_Z1-Av23*;cG~Wo2Vu", options=259) at libiberty/cp-demangle.c:6070
#12 0x0000000000401a87 in cplus_demangle (mangled=0x7ffffac19ea0 "_Z1-Av23*;cG~Wo2Vu", options=259) at libiberty/cplus-dem.c:858
#13 0x0000000000400ea0 in main (argc=1, argv=0x7ffffac1a0a8) at /home/gary/workdir/src/fuzzer.c:26

The symbol that crashed it is one frame up from the bottom of the backtrace.

It was pretty easy to write a new graphical backend for Jainja using the Pepper Plugin API. So it's possible to write Java graphical user interfaces on NaCl now !

A demo is available on the Chrome Web Store.

Bradley M. Kuhn wrote an analysis on the recent Appeals Court Decision in Oracle v. Google. Pointing out who the real winners are and that it will now take years before we will have more clarity:

The case is remanded, so a new jury will first sit down and consider the fair use question. If that jury finds fair use and thus no infringement, Oracle’s next appeal will be quite weak, and the Appeals Court likely won’t reexamine the question in any detail. In that outcome, very little has changed overall: we’ll have certainty that API’s aren’t copyrightable, as long as any textual copying that occurs during reimplementation is easily called fair use. By contrast, if the new jury rejects Google’s fair use defense, I suspect Google will have to appeal all the way to SCOTUS. It’s thus going to be at least two years before anything definitive is decided, and the big winners will be wealthy litigation attorneys — as usual.

You will want to read the whole thing to know why from a copyleft perspective this decision will give that strange feeling of simultaneous annoyance and contentment.

Orson Charts 3D / Enhanced SVG Export

The source version of this blog entry can be found at


In April, we released Orson Charts version 1.3. This release brings exciting new interactive features, including mouse events that can identify all chart elements (titles, axis labels, legend items, data items, etc.) and provide links back to the chart's source data. This gives developers endless possibilities to create dynamic and interactive visualisations in Java applications, whether it be for item selections, popup info (dialogs and/or tooltips) or drill-down data displays. With Orson Charts 1.3 it is now even easier to let your users explore their data.

This post highlights a less visible feature in the 1.3 release---the enhanced SVG export---which also supports interactivity (mouse events and tooltips) for server-side generated charts displayed in modern web browsers.

Enhanced SVG Export

The enhanced SVG export adds a custom attribute to the SVG elements it generates to identify the chart element (or data item) that the SVG element corresponds to. This custom attribute can be picked up by mouse event handlers in JavaScript to provide interactive features in web clients for charts that are generated on the server-side.

This feature is implemented using special rendering hints that get recognised by JFreeSVG but ignored by other Graphics2D implementations. This allows you to use the same code, unchanged, with any output target. In this post, we provide a few examples to illustrate---the source code for these demos is included in the Orson Charts download (you can also view the HTML page source here).


To enable the enhanced SVG export feature, you simply need to call the setElementHinting(boolean) method on your chart instance prior to drawing the chart to the SVGGraphics2D instance provided by JFreeSVG:

SVGGraphics2D g2 = new SVGGraphics2D(width, height);
chart.draw(g2, new Rectangle(width, height));
return g2.getSVGElement(chart.getID());

That's all that needs to be done in terms of the SVG generation (for an overview of creating a chart using Orson Charts, refer to an earlier blog post 'Creating 3D Charts in Java').

Client Side

On the client side, you need to add mouse (or touch) event handlers in JavaScript that perform the required actions when the user interacts with the chart. You can view the page source for this page to see how we've implemented these handlers for the examples. You have complete freedom to use a different approach on the client side, the key is simply to extract the chart ID and item reference from the SVG element that is the source of the event. Orson Charts provides some utility functions in JavaScript that you can use to grab the chart ID and link reference, and dataset classes if you require the full dataset on the client-side (for example, to generate tooltips as we do in these examples).


See the examples at


In this post we showed how Orson Charts and JFreeSVG integrate to provide both high quality vector rendering in modern web browsers plus the ability to support interactive features such as tooltips and mouse selection. The source code for these examples is included in the Orson Charts download.
I have an ol' OmniBook 800CT. A small, interesting computer, for its time, extremely advanced!
Small form factor, but still a very nice keyboard, something unmatched on modern netbooks. The unique pop-out mouse. The series started out with 386 processor, b&w display and ROM expansions.
The 800CT is one of the latest models: same form factor, SCSI connector, but color screen (800x600) and a hefty Pentium 133Mhz!
But only 32 MB of ram (the kernel report 31 of real mem, 24 avail mem)

Original 5.4 kernel: 9.2M
Custom kernel: 5.0 M

This shrinkage is quite hefty! almost 50%! More than raw disk usage, this new kernel boots faster and leaves  more free memory. Enough more that X11 is now almost usable

How can this be achieved? essentially by removing unused kernel options. If you remove drivers which you know you don't need because you don't have the hardware (and won't use it, e.g. you know you won't plug-in a certain card in the future) then you configure it out, it won't be built and it won't get in your kernel.
On an old laptop with no expansion except the ports and the PCMCIA port it has, this is relatively easy.

To build your custom kernel, follow the OpenBSD FAQ.

The main theory is to take the kernel configuration file, skim over it line by line it and see if you have the hardware, which you know by checking your dmesg. Dmesg shows which devices and drivers were loaded.Remember that you do not modify GENERIC, but a copy of it.

You can automate this with a tool called dmassage: it will parse your GENERIC configuration and produce an optimal tuned version, however it will not work out of the box.
Why? there are drivers which do not compile if other drivers are not present.

I'm unsure if this is really a bug, in my opinion it is at least "unclean" code, however since mostly this kind of extreme driver-picking is not done, it is not fatal and probably won't be fixed.

 If you remove all drivers at once, you won't easily find out one which one breaks, so my suggestion is to remove them in sets. One by-one is surely too tedious, since for each you need to make a build.
  1. remove X drivers
  2. build, if it works, copy the configuration file as a backup
  3. test the kernel, optionally, by booting it
  4. continue removal

Thus, in case of breakage, you can narrow it down to a less options.

If your mahcine doesn't have a certain bus, you may remove all drievrs attached to each. But proceed from the leaves, not the trunk: gradually remove the peripheral drivers before removing the bus support.

In my case, I found that an unremovable driver is:
et*    at pci?                # Agere/LSI ET1310

Remember that you are running an unsupported kernel, if you want support for a problem, better try it with the original kernel, of which you should anyway for safety retain a backup copy during the iterative building process.


In X11, which needs to be set to 800x600 8-bit mode, I had to uncomment these lines:
    #Option "progLcdModeRegs" "true"
#Option "progLcdModeStretch" "true"

Java browser plugin has been here for a very long time, and for many years it was available on lots of machines. Yet, there were relatively few reports about somebody successfully using any security holes ever discovered.

We are currently under heavy rain of reports about Java applet security exploits on the wild. Some of these are, most likely, true.

How this could be? If some security bug (or fundamental platform weakness whatsoever) already existed for more than a decade, why nobody used if for exploit before? Why intruders spend so much of they time writing exploits of the now rather legacy platform? Where were they using this time before, instead of attacking the platform that at that time was significantly more widespread and relevant?

Jainja is a JVM (Java Virtual Machine) written in Java. Focus is set on portability, not on performances. Jainja supports Java 1.5 features.

This release adds support for Minix, Haiku and Dart.

So Jainja currently works on Linux, Windows, xBSD, Minix, Haiku, Java SE, Android, GWT, and Dart

More infos

I'll be joining my colleagues in the Oracle office in Hamburg to chat about development and other roles within a large IT company as part of the Girls' Day in Germany.

Fiorenza Sofia :)

On 19th of March the most wonderful and happiest event in my life happened, my daughter was born :) at 17:16, in Karlsruhe.

Just in time for Fathers’ day, which happens exactly on 19th of March in Italy (not in Germany, so I can celebrate twice ;)

Everybody said that being a father is a life changing event. While I started to understand it already from those past 9 months, I don’t think I really got prepared to fully appreciate what it really means. In fact, Roman told me that you have 9 months to prepare and inevitably get unprepared to this appointment!

Indeed, and it is really beyond description, but I feel so proud and happy, and scared, all the feelings are mixed up… but above all, I feel full of love, it is so wonderful to look at her smiling (and she does smile a lot!), a warm sense of calm and peace and happiness goes all around, the air is pregnated with it! Everyone should experience this feeling at least once, the World would be so much a better place, I think.

Anyway, it’s time to go and look at her now, she grows so fast and I don’t want to miss not even a minute of her life!

Oracle today announced the availability of JDK 8, a production-ready implementation of the Java SE 8 Platform Specification, which was recently approved through the Java Community Process (JCP). This release includes the largest upgrade to the Java programming model since the platform was introduced in 1996. JDK 8 was developed collaboratively in the OpenJDK Community.

The Java SE 8 release is the result of industry-wide development involving open review, weekly builds and extensive collaboration between Oracle engineers and members of the worldwide Java developer community via the OpenJDK Community and the JCP.

"The release of Java SE 8 demonstrates the innovation driven by the ongoing collaboration between IBM, Oracle and other members of the Java community in OpenJDK," said John Duimovich, Distinguished Engineer, IBM. "Java SE 8 provides enterprise customers with significant gains in productivity, scalability and maintainability, and further demonstrates that they can continue to rely on Java to grow their business."

Taken from an Oracle press release titled Oracle Announces Java 8.

That brings the total count up to 18 press releases from Oracle mentioning OpenJDK.

Two years, seven months, and eighteen days after the release of JDK 7, production-ready builds of JDK 8 are now available for download!

Thanks! A major new release of a software system as large as the JDK is the direct work of many hundreds of developers, with indirect contributions from thousands more. By way of thanks I’d like to mention the major contributors here specifically:

Many smaller—but no less important—contributions were made via the JEP Process and in other ways by many other developers, including (but not limited to!) the following: Niclas Adlertz, Lance Andersen, Sundar Athijegannathan, Jaroslav Bachorik, Joel Borggrén-Franck, Andrew Brygin, Brian Burkhalter, Rickard Bäckman, Sergey Bylokhov, Suchen Chien, Brent Christian, Iris Clark, Sean Coffey, John Coomes, John Cuthbertson, Joe Darcy, Dan Daugherty, Mike Duigou, Xue-Lei Fan, Michael Fang, Robert Field, Daniel Fuchs, Mikael Gerdin, Jennifer Godinez, Zhengyu Gu, Kurchi Hazra, Chris Hegarty, Erik Helin, David Holmes, Vladimir Ivanov, Henry Jen, Yuka Kamiya, Karen Kinnear, Vladimir Kozlov, Marcus Lagergren, Jan Lahoda, Staffan Larsen, Doug Lea, Sergey Malenkov, Stuart Marks, Eric McCorkle, Keith McGuigan, Rob McKenna, Michael McMahon, Morris Meyer, Sean Mullan, Alejandro Murillo, Kelly O’Hair, Frederic Parain, Bhavesh Patel, Petr Pchelko, Oleg Pekhovskiy, Valerie Peng, Anthony Petrov, Pavel Porvatov, Tony Printezis, Joe Provino, Yumin Qi, Phil Race, Tom Rodriguez, Leonid Romanov, Vicente Romero, John Rose, Bengt Rutisson, Vinnie Ryan, Abhijit Saha, Dmitry Samersoff, Paul Sandoz, Naoto Sato, Thomas Schatzl, Alexander Scherbatiy, Harold Seigel, Konstantin Shefov, Xueming Shen, Serguei Spitsyn, Kumar Srinivasan, Lana Steuck, Attila Szegedi, Christian Thalinger, Igor Veresov, Hannes Wallnöfer, Joe Wang, Max Wang, Roland Westrelin, Brad Wetmore, Jesper Wilhelmsson, Hinkmond Wong, Dan Xu, Jiangli Zhou, and Alexander Zuev.

More than code Contributions of reviews, tests, and test results are just as important as contributions of code. Oracle’s internal quality and performance teams did their usual thorough job, and feedback from the wider Java community was equally valuable.

Over 400 of the more than 8,000 bug and enhancement issues addressed in JDK 8 were reported externally. These reports came in throughout the release cycle, enabled by our regular posting of weekly builds, but naturally the rate increased after we posted the Developer Preview build in September. The following early testers who submitted significant bug reports deserve special mention:

Valuable reports continued to come in after we posted the first Release Candidate build in early February. Of the small number of bugs fixed after that build, two were reported externally: A serious signature bug in the lambdafication of the Comparator API, and a nasty correctness bug in the implementation of default methods.

Launch! I’ll host the official Java 8 Launch Webcast at 17:00 UTC next Tuesday, 25 March. Join me for an open question-and-answer session with panel of key Java 8 architects, and to hear from a number of other special guests, by signing up here.

Tomorrow marks 2 years I’m at Red Hat, and it has been so far a very exciting journey, for one of the most interesting and awesome company around. I’m glad I’m here!

Only problem is that I started on 29th of February, and tomorrow is actually 1sth of March… so I need to wait two years more before I can celebrate even the first year… ouch ;) But at least I’ll be able to do a very awesome party by  then!

The JogAmp community held a Ji Gong freedom talk that reminded people to exercise the 4 freedoms granted by the free software licenses in front of the free java developer room audience. The talk also proposed and showcased technical enhancements for High Availability JVM Technology on All Platforms.
Slides from the Ji Gong talk can be obtained at:

During the same week JogAmp released version 2.1.4 of its high performance java opengl audio & media processing librarys.
This release includes some new highlights:
* Android OpenCL test apk’s. This enable you to compile and test an OpenCL JOCL application on desktop and then deploy on Android without using any OpenCL SDK for the phone, the JOCL binding will locate and bind the OpenCL drivers at runtime.
* Enable use of custom mouse pointers and window icons using the NEWT window and input toolkit.
* Multi window support on the Raspberry Pi including mouse-pointer use directly from console!
Complete list of bugs resolved for this 2.1.4 release can be found at:

JiGong-Panorama-extracted-from-video Panorama-of-JiGong-JogAmp-talk-audience-at-FOSDEM-2014-Free-Java-Devroom 14020010 14020025 14020026 14020034 14020069 JamVM-OpenJDK8-FOSDEM-2014-panorama 14020032 14020027

Last weekend I’ve been talking about the Shenandoah GC at FOSDEM 2014. I announced the availability of the Shenandoah source code and project pages. Until Shenandoah becomes a proper OpenJDK project, it will be hosted on IcedTea servers. We currently have:

We also filed a JEP for Shenandoah, here you can find the announcement and discussion on hotspot-gc-dev.

If you are interested in the slides that I prsented at FOSDEM, you can find them here.

Implementation-wise we’re making good progress. Concurrent evacuation is working well and support for the C1 compiler is almost done.

Monument to Mozillians

Last week in Mozilla’s San Francisco office, members of the DOM, WebAPI, Accessibility, Networking, JS, Security, Add-Ons, and Apps teams gathered for discussions, hacking, and some good old face time.

Productive sessions were held on many topics. I’ve highlighted a few here:


Web Workers

Service Workers

(Incremental) Cycle Collection ((I)CC)

Do Not Track (DNT)

  • Monica led a discussion of how to make DNT more effective

Content Security Policy (CSP)

  • Discussed applying CSP to chrome resources
  • Decided on a direction not requiring reinvention of the system principal that creates a new context data structure that includes a principal and other stuff like CSP per document.

Referrer handling and ping

  • Reached consensus that we should help with site efficiency by providing mechanism to strip referrer data on client side (to avoid additional RTT and redirect on the server)
  • Faster and more private for all
  • We will follow up with potentially reducing the amount of referrer data sent by default in gecko.

Sandboxing and e10s (electrolysis)

  • We (mostly billm) presented the state of e10s and sandboxing on desktop and b2g, including instructions on how to test your things with e10s/sandbox enabled
  • General Q&A about the project architecture and current sticking points


  • Shared plan for e10s and accessibility
  • Lots of face-to-face hacking
  • Standards work

IPDL and PBackground

  • bent gave an overview of IPDL and PBackground in particular
  • we have video here and will clean it up for public consumption some time soon

Improving DOM performance

  • many options for improving DOM performance were discussed
  • the biggest thing needed is test cases
  • lots of action items from this session are in the raw etherpad notes (at bottom)

Apps and Marketplace requests

  • Harald and Vishy joined us to bring up some concerns and questions that have been voiced by the marketplace team and various partners

Networking (necko)

  • The networking team held 3 sessions: one to discuss improvements to the necko APIs (better off-main thread support, providing a wrapper library with security checks built in, and upgrading to async file I/O were mentioned); one on ways that layout could better set network channel priority for faster loading of visible resources; and one to map out the API needed to support Service Workers. We also made a lot of progress designing off-main websockets and support.

Web Components

  • dglazkov from Google came by and participated in some good discussions about Web Components

Julien Wajsberg represented the Gaia team’s needs with a discussion of Haida, the upcoming Firefox OS UX

Raw notes from the week with lots of links are available here:

Occasionally I see questions about how to import gdb from the ordinary Python interpreter.  This turns out to be surprisingly easy to implement.

First, a detour into PIE and symbol visibility.

“PIE” stands for “Position Independent Executable”.  It uses essentially the same approach as a shared library, except it can be applied to the executable.  You can easily build a PIE by compiling the objects with the -fPIE flag, and then linking the resulting executable with -pie.  Normally PIEs are used as a security feature, but in our case we’re going to compile gdb this way so we can have Python dlopen it, following the usual Python approach: we install it as and add a a module initialization function, init_gdb. (We actually name the module “_gdb“, because that is what the gdb C code creates; the “gdb” module itself is already plain Python that happens to “import _gdb“.)

Why install the PIE rather than make a true shared library?  It is just more convenient — it doesn’t require a lot of configure and Makefile hacking, and it doesn’t slow down the build by forcing us to link gdb against a new library.

Next, what about all those functions in gdb?  There are thousands of them… won’t they possibly cause conflicts at dlopen time?  Why yes… but that’s why we have symbol visibility.  Symbol visibility is an ELF feature that lets us hide all of gdb’s symbols from any dlopen caller.  In fact, I found out during this process that you can even hide main, as seems to ignore visibility bits for this function.

Making this work is as simple as adding -fvisibility=hidden to our CFLAGS, and then marking our Python module initialization function with __attribute__((visibility("default"))).  Two notes here.  First, it’s odd that “default” means “public”; just one of those mysterious details.  Second, Python’s PyMODINIT_FUNC macro ought to do this already, but it doesn’t; there’s a Python bug.

Those are the low-level mechanics.  At this point gdb is a library, albeit an unusual one that has a single entry point.  After this I needed a few tweaks to gdb’s startup process in order to make it work smoothly.  This too was no big deal.  Now I can write scripts from Python to do gdb things:

import gdb
gdb.execute('file ./install/bin/gdb')
print 'sizeof = %d' % gdb.lookup_type('struct minimal_symbol').sizeof


$ python

Soon I’ll polish all the patches and submit this upstream.

JNode, the free operating system developed in Java, has now its twitter account. Follow #JNode !

GitHub is now the main repository for JNode sources :

. We are now using GitHub’s issue tracker.

The annotation processing API, both the processor-specific portion of the API in javax.annotation.processing and the language modeling portions in javax.lang.model.*, are being updated to support the new language features in Java SE 8. Procedurally, the proposed changes are covered by the second maintenance review of JSR 269: Maintenance Draft Review 2.

As summarized on on the maintenance review page, there are three categories of changes from the version of the API shipped with Java SE 7:

  1. Cleaning up the existing specification without changing its semantics (adding missing javadoc tags, etc.)
  2. API changes to support the language changes being made in Project Lambda /JSR 335. These includes adding javax.lang.model.type.IntersectionType as well as javax.lang.model.element.ExecutableElement.isDefault.
  3. API changes to support the language changes being made under JSR 308, Annotations on Java Types. These include javax.lang.model.AnnotatedConstruct and updating javax.annotation.processing.Processor.

The small repeating annotations language change, discussed on an OpenJDK alias, is also supported by the proposed changes.

A detailed specification difference is available. Please post any comments here or send them to me through email.