BowlerKernel
IURLOpen.java
Go to the documentation of this file.
1 package com.neuronrobotics.bowlerstudio.scripting;
2 
3 import java.awt.Desktop;
4 import java.io.IOException;
5 import java.net.URI;
6 
7 public interface IURLOpen {
8  public default void open(URI toOpe) {
9  if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.BROWSE))
10  try {
11  Desktop.getDesktop().browse(toOpe);
12  } catch (Exception e) {
13  // TODO Auto-generated catch block
14  e.printStackTrace();
15  }
16  }
17 }