A simple java library for launching a default browser.
Licensed under MIT License.
package com.example;
import io.wmartinmimi.github.browserlauncher4j.BrowserLauncher;
import java.net.URI;
import java.net.URISyntaxException;
public class BrowserLauncherTest {
public static void main(String[] args) throws URISyntaxException {
BrowserLauncher.launchBlocking(new URI("https://example.com"));
}
}
For more examples see BrowserLauncherTest.java.
<dependency>
<groupId>io.github.wmartinmimi</groupId>
<artifactId>browserlauncher4j</artifactId>
<version>1.0.1</version>
</dependency>
implementation group: 'io.github.wmartinmimi', name: 'browserlauncher4j', version: '1.0.1'
implementation 'io.github.wmartinmimi:browserlauncher4j:1.0.1'
implementation("io.github.wmartinmimi:browserlauncher4j:1.0.1")
For other build systems see here.