This sample is located in \Samples\Security\Loader.
Description
Using the Sample
Key Project Files
Technologies Demonstrated
This sample shows how to set security attributes on class files as they are loaded by implementing a secure class loader. The sample code contains an implementation of a custom class loader that extends com.ms.security.SecurityClassLoader, and provides a sample application that uses the class loader in an attempt to load system files.
To compile the sample
Use Nmake.exe to compile the makefile in the \Samples\Security\Loader directory.
To run the sample
Run Demo.bat in the \Samples\Security\Loader directory. Any failure messages will be redirected to Errors.txt.
This file demonstrates the custom class loader that handles security permissions.
FileReader.javaThis is a Java class that tries to load a specified file.
perms.iniThis file lists the file permissions to be allowed.
SampleLoader.javaThis file is a custom class loader that extends the com.ms.security.SecurityClassLoader. The file contains the pertinent sample information.