Hi,
I'm trying to read a file inside my custom plugin like this:
JsonReader reader = new JsonReader(new FileReader(getClass().getClassLoader().getResource(
"myplugin/es/plugin/file.json").getFile()));
but I got:
access denied (\"java.io.FilePermission\" \"file:/usr/share/elasticsearch/plugins/myplugin/myplugin-1.0.0.jar!/myplugin/es/plugin/file.json\" \"read\"
I tried to add:
permission java.io.FilePermission "/usr/share/elasticsearch/plugins/myplugin/*", "read,write";
or
permission java.io.FilePermission "*", "read,write";`
to my plugin-security.policy
file, but same error.
Any help please?
Thanks.
Regards