All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tech.tablesaw.plotly.display.Browser Maven / Gradle / Ivy

There is a newer version: 0.43.1
Show newest version
package tech.tablesaw.plotly.display;

import java.awt.Desktop;
import java.io.File;
import java.io.IOException;
import java.net.URI;

public class Browser {

  public static void main(String[] args) throws Exception {

    if (Desktop.isDesktopSupported()) {
      Desktop.getDesktop().browse(new URI("http://www.example.com"));
    }
  }

  public void browse(File file) throws IOException {
    if (Desktop.isDesktopSupported()) {

      Desktop.getDesktop().browse(file.toURI());
    } else {
      throw new UnsupportedOperationException("Browser not supported.");
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy