我想从Java打开一个链接,我尝试了这个:
public static void main(String[] args) {
try {
//Set your page url in this string. For eg, I m using URL for Google Search engine
String url = "http://myurl.com?id=xx";
java.awt.Desktop.getDesktop().browse(java.net.URI.create(url));
}
catch (java.io.IOException e) {
System.out.println(e.getMessage());
}
}
它的工作正常,但问题在于查询字符串在该URL中。我不想将其作为查询字符串传递,因为它是一个秘密密钥。它应该作为隐藏的网页请求传递。我该怎么做?