A new, headless browser written in Java with latest JavaScript support. Powered by the GraalJS-Engine, the NodeJs-Engine and Puppeteer.
HBrowser hBrowser = new HBrowser();
try(NodeWindow hWindow = hBrowser.openWindowAndLoad("https://example.com")){
// Do stuff
}
You can choose from two JavaScript engines: NodeJs and GraalJs.
The NodeJs engine is currently the default and recommended one. Puppeteer gets installed automatically along with the latest NodeJs version. Currently, only Windows 64x supported (going to change very soon)!
Puppeteer and NodeJs are directly usable in Java.
Creating a new browser completely in Java is ongoing work (with GraalJs). Read more below at "Why contribute?".
Jsoup is used to work with HTML in Java.
- Java 8 or higher required.
- Click here for maven/gradle/sbt/leinigen instructions.
- Make sure to watch this repository to get notified of future updates.
I worked with multiple different browsers like JCEF, Selenium, JWebdriver, HtmlUnit and maybe some more I don't remember now, but all have one thing in common. They have some kind of caveat.
That's why I started this project. To create a new browser, not dependent on Chromium or Waterfox etc., written in Java, compatible with all operating systems that can run Java. We use Jsoup to handle HTML and the GraalJS engine to handle JavaScript.
Now you may ask: Why do you need my help? Our problem is that most of the JavaScript code out there uses so called Web-APIs , which get shipped with each browser. We will need to implement those APIs by ourselfs.
There are a lot of Web-APIs available, so we need some motivated people to implement them. If you want to help, thank you very much, already in advance! Click here to see a list of already implemented APIs and how to implement one. If you are working on an implementation open an issue to keep track of who is working on what and avoid duplicate work.
If you have never contributed before, we recommend this Beginners Article. If you are planning to make big changes, create an issue first, where you explain what you want to do. Thank you in advance for every contribution! If you don't know how to import a GitHub project, check out this guide: IntelliJ IDEA Cloning Guide
- Written in Java, with JDK 8, inside of IntelliJ IDEA
- Built with Maven, profiles: clean package
- https://spec.whatwg.org/ | Details about JS Web-APIs
- https://www.w3.org/TR/?tag=webapi | Details about JS Web-APIs
Insert_usage_examples_here
Frequently_asked_questions_here
Name/Link | Usage | License |
---|---|---|
GraalJS | Enables executing JavaScript code from Java | License |
Jsoup | Used to load pages and modify their HTML code | License |