I tried to run the java version of Nachos on Windows 7 and Redhat Linux, but both failed due to RuntimePermission problem as below.
user\nachos\proj1> java nachos.machine.Machine nachos.conf
nachos 5.0j initializing... config interrupt timer user-check
Lacked permission: (java.lang.RuntimePermission createClassLoader)
Exception in thread "main" nachos.machine.AssertionFailureError
at nachos.machine.Lib.assertTrue(Lib.java:77)
at nachos.machine.Lib.assertNotReached(Lib.java:96)
at nachos.machine.Lib.checkMethod(Lib.java:565)
at nachos.machine.Machine.checkUserClasses(Machine.java:262)
at nachos.machine.Machine.main(Machine.java:57)
Searching on Google using keywords RuntimePermission
and createClassLoader
, found some solutions that need to modify the file: $(JAVA HOME)\jre\lib\security\java.policy
. So I appended following lines to it.
grant {
permission java.security.AllPermission;
};
However, it still can't work. Can anyone provide any clues on this problem? Thanks.