File tree Expand file tree Collapse file tree
virtdata-docsys/src/main/java/io/virtdata/docsys/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727
2828import javax .servlet .DispatcherType ;
2929import javax .servlet .ServletRegistration ;
30+ import java .awt .*;
3031import java .net .MalformedURLException ;
32+ import java .net .URI ;
3133import java .net .URL ;
3234import java .nio .file .AccessMode ;
3335import java .nio .file .Files ;
3436import java .nio .file .Path ;
3537import java .util .*;
38+ import java .util .List ;
3639import java .util .stream .Collectors ;
3740
3841/**
@@ -290,6 +293,10 @@ public void run() {
290293 server .setConnectors (connectors .toArray (new Connector [0 ]));
291294
292295 server .start ();
296+
297+ if (Desktop .isDesktopSupported () && Desktop .getDesktop ().isSupported (Desktop .Action .BROWSE )) {
298+ Desktop .getDesktop ().browse (new URI (bindScheme + "://" + bindHost + ":" + bindPort + "/" ));
299+ }
293300 logger .info ("Started documentation server at " + bindScheme + "://" + bindHost + ":" + bindPort + "/" );
294301 System .out .println ("Started documentation server at " + bindScheme + "://" + bindHost + ":" + bindPort + "/" );
295302
You can’t perform that action at this time.
0 commit comments