Reading Chrome's Bookmarks in Java
Contributed By; Avinash R. Prasad
Google recently released Chrome, a browser based on WebKit (the same one used by Safari). The user interface is quite pleasant and so is its functionality.
A few improvements need to be made (for eg.: addition of plugins, RSS feed reader, autofill in textboxes) before it endears itself to techies and common users.
Having worked on synchronizing various user settings and files from within the major browsers (namely IE, FF, Safari, Opera and Konqueror), it was only natural I started breaking down Chrome and its settings.
The first thing I've looked into is finding a way to synchronize its bookmarks. As of this writing, Chrome currently is built for only Windows XP and Windows Vista, with versions for Mac and Linux expected sometime in the near future.
Chrome uses SqlLite databases to save all of the settings and preferences. There's a blog entry 2 which provides some great insights into how the bookmarks are stored in these files.
Tips and Tricks
Enriched with the information from the link above, I found writing a java program to extract the bookmarks really simple. With the inclusion of the SQLLite Java wrapper and the corresponding JDBC driver binary, reading from the tables turned out to be a snap. The program was compiled in Netbeans 6.1 with Java 1.6 on a Windows Vista Home Basic edition.
Kindly download the NetBeans Project 3 and see it yourself :)