JNI and security

Hi,

We are coding new functionallity on a legacy C code. We are using JNI to to comunicate to an opensource library.

We faced with the need to create some files and to connect to a remote host, but due to the jvm sandbox we cannot operate as we need.

We tried policy files, signed jars,... but surely we missed something.

The simptoms are that when the control passes to our java classes, the jvm doesn't read any policy file (including java.policy).

In the class constructor we ask for a security manager and check if the create file operation could be done.

Everything works well, but the file is not written (we add some content, so it must have 10 or 12 bytes).

Could any one bring us some light?

[750 byte] By [almogavera] at [2007-10-3 1:02:48]
# 1
The JVM reads the policy files at startup, not 'when control passes to Java classes'. Does that help?
ejpa at 2007-7-14 17:58:58 > top of Java-index,Security,Other Security APIs, Tools, and Issues...