views:

82

answers:

2

Hi,

I am creating an application which uses the Java Plugin Framework to load plug-ins and intergrate them into the program.

My question is: Is there anyway restrict certain operations (such as starting a new process) in the plug-ins? What I have in mind is something like Java WebStart, i.e when the application wants to access the FileSytem, the user is prompted whether or not to allow the action.

I was thinking maybe creating a security manager and, if so, how can I do that?

A: 

I suggest you look at these

http://www.google.co.uk/search?q=system+set+security+manager+example

Peter Lawrey
A: 

One question comes to my mind - why did you choose JPF and not Equinox? I was curious and looked at the JPF pages and it looks like the projects last update is two years ago.

They started the project to decouple the eclipse plugin framework of Eclipse 2.x but Eclipse itself moved to OSGi (Equinox) starting with version 3.0. Equinox has become the reference implementation of OSGi and there's a lot of good books available and even more excellent experts that can provide help on any aspect.

To my opinion: JPF was a good idea some years ago (just as the first implementations of a plug-in framework in early Eclipse releases) but the actual standard for a plug-in framework seems to be OSGi now.

Sure, that does not answer your question, but my message was just to long for a comment.

Here's a site that explains implementing security with Equinox (or at least gives some hints): http://www.eclipse.org/equinox/security/

Andreas_D
To be honest I did not know "OSGi (Equinox)" existed, I was told about JPF and didn't bother to look further.
Kryten