3

I am creating a plugin system which dynamically loads classes, and since the plugins are user created, I want to restrict their access to everywhere but a working directory. Is there a solution for this in Java?

KJKalle
  • 47
  • 6

1 Answers1

5

Basically the JVM offers the Security manager architecture.

One part of that are FilePermissions, which enable some sort of control here.

But note: this is really an advanced topic, and easy to get wrong, but your primary use case of isolating plugins coming from different packages should be doable.

GhostCat
  • 137,827
  • 25
  • 176
  • 248