Name: GlacialEntropy 2009-07-13 2:23
public String readFile(File aFile) {
StringBuilder contents = new StringBuilder();
try {
BufferedReader input = new BufferedReader(new FileReader(aFile));
try {
String line = null;
while (( line = input.readLine()) != null){
contents.append(line);
contents.append(System.getProperty("line.separator"));
}
}
finally {
input.close();
}
}
catch (Exception ex){
ex.printStackTrace();
}
System.out.println(contents.toString());
return contents.toString();
}This compiles and runs properly in any IDE, but it throws security exceptions when I put it into an html file with this code:
<applet code =
"uniSim.class" width = 800 height =
600></applet>Is this bad?