java - How do I open a link directly onto a web browser -
java - How do I open a link directly onto a web browser -
i'm experimenting opening link straight on web browser. snippet of code has no errors. however, when run, website not pop in web browser. how prepare this?
if (str1.tolowercase().contains("will pigs fly")) pigs(); public static void pigs(){ try{ string url = "https://www.youtube.com/watch?v=yqo0tfuueay"; string cmd = "cmd.exe /c start " + url; runtime.getruntime().exec(cmd); }catch(exception ex){} }
java url
Comments
Post a Comment