سؤال

I'm trying to make calls from unsigned code to signed code with a Webstart application. The calls are made to a function that returns System.getProperty values. Ofcourse this cannot happen in the unsigned code. So what are the restrictions on calls made from unsigned code to signed code and how can I solve the issue?

One particular issue appears when I reach a function in a signed library from the unsigned code, giving me a 'PermissionException' because I can't use System.getProperty.

However, asking on the LWJGL forum resulted in a answer that I can reach the LWJGL functions from unsigned code, if the LWJGL libraries are signed. This contradicts the previous.

Signing the unsigned code is not possible, since it is compiled on the fly with the JavaCompiler API. Well, maybe it is, but it would be hard work. If one can find an example for this (I couldn't), that would be awesome.

هل كانت مفيدة؟

المحلول

For this particular problem, I can use AccessController.doPrivileged.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top