我有一些代码:
var Base64 = java.util.Base64;
var URL = java.net.URL;
var HttpURLConnection = java.net.HttpURLConnection;
var connectionAddress = new URL("http://twitter.com/");
var httpConnection = Java.to(
connectionAddress.openConnection(),
Java.type("java.net.HttpURLConnection")
);
这会引发异常:TypeError: sun.net.www.protocol.http.HttpURLConnection: http://twitter.com/ is not an Object
任何人有任何想法如何处理这个?