Is a pure Java web browser practical?

426    Asked by AlanTaylor in Java , Asked on Oct 13, 2022

I know that a Java web browser is possible, but is it practical? I've seen the Lobo project and must admit I am impressed, but from what I've gathered it seems that development stopped in 2009. Would a browser coded in pure Java (no WebKit java bindings of any type) be able to compete with those among the ranks of Chrome or Firefox, or would it be inherently slower, hindering the user?

Answered by Amit Sinha

The programming language is, most likely, not going to be the stumbling block. The JVM's mandatory memory management may be a disadvantage in some performance-critical parts (e.g. memory hunger; but then, Java's GC might actually be better at preventing memory leaks than anything you could roll yourself), and there are a few extra security concerns, but other than that, I see no obvious show stoppers.


However, The Java web browser on the scale of Firefox or Chromium is a massive undertaking, and both projects have a huge body of experience behind them - Mozilla builds upon decades of browser building (and some famous failures), and Chrome/Chromium has both Google and Apple (a major force in the development of WebKit) behind it and absorbed a lot of knowledge and experience from KDE and other large rock-solid Open Source projects. Both additionally make use of dozens of battle-proven libraries, not only render engines, but all sorts of things. Vector graphics, font rendering, parsing, XML DOM Tree manipulation, networking, caching, cryptography, the list goes on and on, and you don't want to reinvent all those wheels yourself, because they are hard to do and easy to get wrong. In short, building an industry-strength web browser is pretty damn hard, and that's the reason there are only a handful of success stories in this arena. The programming language has relatively little to do with it, although C and C++ are at an advantage, both technically and socially.


Your Answer

Interviews

Parent Categories