So I want to open an url with the browser.
any idea how to make links working on sites? local it is working.
link is a string with the url
I used:
if Desktop.isSupported() {
Desktop desk = Desktop.getDesktop();
desk.browse(new URI(link));
}
ProcessBuilder pb = new ProcessBuilder(); String[] cmd = { "cmd", "/C", "start", link }; pb.command(cmd); Process p; try { p = pb.start(); } catch (IOException e) {} [/code} [code]Runtime.getRuntime().exec( "rundll32 url.dll,FileProtocolHandler " + link );