Cannot access with modifier error.
I get this error when I try to instantiate the class coded below. Can
anybody help.
IllegalAccessException: Class
koala.dynamicjava.interpreter.context.GlobalContext can not access a
member of class url.DnldURL with modifiers ""
at sun.reflect.Reflection.ensureMemberAccess(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
package url;
import java.io.*;
import java.net.*;
public class DnldURL {
private DataInputStream URLData;
DnldURL() throws IOException {
try {
URLData = new DataInputStream(new BufferedInputStream(
new URL("someurl.com" ).openStream()));
}
catch (MalformedURLException mue) {
System.out.println("Ouch - a MalformedURLException
happened.");
mue.printStackTrace();
System.exit(1);
}
}
//_________________________________________________________________________________
public DataInputStream getURLData() {
return URLData;
}
}