# Panopticon Sample Program

Panopticon includes a sample program, written in Java, which demonstrates how to use Panopticon through the Java API. The sample program determines the type of encryption used to encrypt a file and, if possible, decrypts the file.

The source code for the sample program, and a compiled `PanopticonSample.jar`, are located in `install\javaapi\sample`, where `install` is the path to your copy of the Panopticon SDK.

When you run the program using the provided shell scripts, the working directory must be the `install\javaapi\sample` folder.

To run the sample program

1. Open a command prompt in the `javaapi\sample` directory.

2. Run the program:

   - Directly

     `java -Djava.library.path="bin_path" -jar PanopticonSample.jar bin_path license_org license_key tenant_id client_id client_secret input_file output_file`

   - Using the Windows shell script

     `PanopticonSample.bat bin_path license_org license_key tenant_id client_id client_secret input_file output_file`

   - Using the Linux shell script

     `PanopticonSample.sh bin_path license_org license_key tenant_id client_id client_secret input_file output_file`

   The arguments are as follows.

   `bin_path` | The path to the Panopticon `bin` directory.
   `license_org` | The organization name from your Panopticon license.
   `license_key` | The key from your Panopticon license.
   `tenant_id` | Your Microsoft Azure tenant ID.
   `client_id` | The application client ID for authentication with Azure.
   `client_secret` | The application client secret for authentication with Azure.
   `input_file` | The path of the file to decrypt.
   `output_file` | The path and file name to use for the decrypted file.

_FT_HTML5_bannerTitle.htm