Código Javascript
:
Ver originalpackage javaapplication5;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import javax.swing.JApplet;
import netscape.javascript.JSObject;
public class JavaApplication5 extends JApplet {
public static void main(String[] args) {
}
public void init()
throws MalformedURLException, IOException {
JSObject mainWindow = JSObject.getWindow(this);
URL url = new URL("http://www.megaupload.com/?d=WVX0MGOQ");
URLConnection con = url.openConnection();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String linea;
int i=1;
linea = in.readLine();
while ((linea = in.readLine()) != null && i < 180) {
i++;
}
int j = 0;
String [] campos = linea.split("\"");
mainWindow.eval((new StringBuilder("showLink('")).append(campos[1]).append("');").toString());
}
}
Me marca un error en public void init()
init() in javaapplication5.JavaApplication5 cannot override init() in java.applet.Applet
overridden method does not throw java.io.IOException
Add @Override Annotation
¿Que puede ser ? :S