File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Making a Browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Making a Browser" Watch "Making a Browser" New topic

Making a Browser

colin shuker
Ranch Hand

Joined: Apr 11, 2005
Posts: 750
Hi, I was wondering if it was possible to make a browser using standard java.
Or is it just too compicated for me to bother with?
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

Been done and a bit pointless never-the=less IMHO.

GenRocket - Experts at Building Test Data
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Netscape tried to do it, with lots of manpower thrown at it, and when browsers had way fewer features than today, and failed. So I'd say look for some other project that doesn't compete with powerful, free, native-code products on the market.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15091

Ofcourse it's possible in principle - you can make anything with Java.

Swing already contains classes that can render HTML (see the package javax.swing.text.html) so you won't have to write your own HTML renderer and parser from the ground up, although the Swing classes are most likely not as sophisticated as the major web browsers.

Java also has classes for reading data over HTTP (see

So it's probably not too difficult to make a simple browser with Java.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
As a matter of historical perspective, I would like to point out that when Java was first introduced, the most complex and powerful Java application was in fact the "Hotjava" browser. Google search for "hotjava browser" will get you to the source code.

It was pretty impressive at the time, especially the molecular model applet that let you rotate a "ball and stick" model in real time with the mouse.

I agree. Here's the link:
subject: Making a Browser
jQuery in Action, 3rd edition