question about restricted packages

Sean Mullan sean.mullan at oracle.com
Tue Jan 28 05:18:38 PST 2014


On 01/28/2014 06:36 AM, Vicente-Arturo Romero-Zaldivar wrote:
> Hi Jeff,
>
> On 27/01/14 18:56, Jeff Nisewanger wrote:
>> But be aware that this isn't a static list -- applications or
>> middleware can extend it at runtime (generally when they start up).
>
> So this means that it's better to use a method to check if a package is
> restricted or not. Do you know if there is any?

Security.getProperty("package.access");

This returns the value of the property (including any subsequent 
modifications). The return value is a String containing the packages 
separated by commas, so you will have to write a bit of additional code 
to parse this into a list of packages.

--Sean


More information about the security-dev mailing list