java.awt.Desktop
is the class you’re looking for.
import java.awt.Desktop;
import java.net.URI;
// ...
if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {
Desktop.getDesktop().browse(new URI("http://www.example.com"));
}
More Related Contents:
- how to add my button in reference in java?
- how to find a number which is present in an array or not and get the position of that number in java [duplicate]
- Implementing a simple file download servlet [duplicate]
- What is an interface in Java?
- Must JDBC Resultsets and Statements be closed separately although the Connection is closed afterwards?
- Java count occurrence of each item in an array
- clone() vs copy constructor vs factory method?
- Java Streams: Replacing groupingBy and reducing by toMap
- How to sort an ArrayList using multiple sorting criteria?
- HttpURLConnection Invalid HTTP method: PATCH
- How to set up java logging using a properties file? (java.util.logging)
- Why is “final” not allowed in Java 8 interface methods?
- java.rmi.ConnectException: Connection refused to host: 127.0.1.1;
- What is the difference between lowagie and iText?
- Serializing enums with Jackson
- How do you have the code pause for a couple of seconds in android?
- How do I find the last modified file in a directory in Java?
- Text coordinates when stripping from PDFBox
- Why do variable names often start with the letter ‘m’? [duplicate]
- Converting Epoch time to date string
- Is there a way to retrieve the autoincrement ID from a prepared statement
- Maven 3.3.1 ECLIPSE: -Dmaven.multiModuleProjectDirectory system propery is not set
- Match for root url and serving of static resources
- How to emit and execute Java bytecode at runtime?
- Is there an insertion order preserving Set that also implements List?
- Is there a good way to get the date of the coming Wednesday?
- Meaning of “Cannot reduce the visibility of the inherited method” with an interface
- Firebase Authentication FirebaseNetworkException: A network error (such as timeout, interrupted connection or unreachable host) has occurred
- Is MERGE an atomic statement in SQL2008?
- Where do resource files go in a Gradle project that builds a Java 9 module?