Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

18
LINES

< > BotCompany Repo | #1008415 // openPlatformBrowser

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (9668L/53K).

static swappable void openPlatformBrowser(S url) ctex {
  if (isHeadless()) ret;
  /*if (isLinux()) {
    nohup(print(firstCmdOnPATH_mandatory("xdg-open") + " " + platformQuote(url)));
  } else {*/
    print("Opening platform-specific browser on: " + url);
    //try {
      Desktop.getDesktop().browse(uri(url));
    /*} catch print e {
      startFirefox(url);
    }*/
  //}
}

svoid openPlatformBrowser(URL url) {
  if (url == null) ret;
  openPlatformBrowser(str(url));
}

Author comment

Began life as a copy of #1008412

download  show line numbers  debug dex  old transpilations   

Travelled to 17 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ekrmjmnbrukm, gwrvuhgaqvyk, ishqpsrjomds, iveijnkanddl, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1008415
Snippet name: openPlatformBrowser
Eternal ID of this version: #1008415/11
Text MD5: e9d9b30c6fdf977ff5d1caae67f8680c
Transpilation MD5: a3ab881c70e06e13a0369818d024dda5
Author: stefan
Category: javax / desktop
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-11-26 17:16:45
Source code size: 492 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 514 / 745
Version history: 10 change(s)
Referenced in: [show references]