Standalone mode
Standalone mode lets you launch a Chromium-powered browser window directly from Java without using Swing, SWT or any other GUI toolkit. Equo Chromium will automatically create and manage the window for you. In other words, you can open a web browser in a plain Java app with no UI dependencies. This makes it very easy to show web content without writing any extra code realting to the window.
Basic usage example
To use Standalone mode, simply call the static methods on the ChromiumBrowser class. For example, you might write something like this in your main method:
import com.equo.chromium.ChromiumBrowser;
public class Standalone {
public static void main(String[] args) {
ChromiumBrowser browser = ChromiumBrowser
.standalone("https://docs.equo.dev/main/getting-started/introduction.html");
ChromiumBrowser.startBrowsers(); (1)
}
}
[1] This blocks the current thread until you close the browser windows. If you prefer not to block the main thread, you can run with Multithread. Equo Chromium provides a system property to enable its own background message loop. To run with Multithread, please read our Multithread page. With |