TaT ReadingChromeSBookmarksInJava

Reading Chrome's Bookmarks in Java

Contributed By; Avinash R. Prasad

Adapted from http://avinpr.blogspot.com/2008/09/reading-chromes-bookmarks-in-java.html.


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.
Its V8 engine definitely appears to make JavaScript run a whole lot faster than other browsers (even better than Opera in my tests). This video 1 explains a little more on its architecture and working.


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 :)


#1 V8: an open source JavaScript engine
#2 Greg Duncan's blog
#3 ChromeBookmarks.rar

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo