我有一个在浏览器中打开 URL 的按钮:
URI uri = new URI("http://google.com/");
Desktop dt = Desktop.getDesktop();
dt.browse(uri.toURL()); // has error
但我在最后一条语句中收到以下错误:
The method browse(URI) in the type Desktop is not applicable for the arguments (URL)
感谢您的任何建议。