Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embedding a Web Browser/HTML Engine in Java

I am making an application in java which would be showing a HTML web page, getting the address of the webpage from a config file. The web page will be on the local disk. Now what i want is, when i start the Java program, the program will be showing the the webpage fullscreen on the computer without the mouse cursor. Now for that i would be first needing a HTML Engine or a web browser which can run inside the java application(events liek press of button etc etc will be passed to the web page from the java application). I cant find a way to show these web pages. I would be needing to show current tech web pages , such that it can process everything from jQuery, Js, Ajax, CSS3, HTML 5. So that beautiful web pages are able to be shown through the Java program.

like image 650
Shaurya Chaudhuri Avatar asked Aug 31 '25 22:08

Shaurya Chaudhuri


2 Answers

JxBrowser is a good api for such purpose. It uses the chromium engine which offers an optimum speed just like native browsers. I have used it and it worked for me

like image 85
user4724215 Avatar answered Sep 03 '25 10:09

user4724215


Maybe you can give a try to jxbrowser

It promise to be a very good component.

From the home page:

Embed a lightweight Chromium-based Swing component into your Java application to display modern web pages built with HTML5, CSS3, JavaScript, Flash, Silverlight etc.

like image 24
LordMax Avatar answered Sep 03 '25 10:09

LordMax