Jar Protector: User Manual
Jar Protector: User Manual
USER MANUAL
Version: 1.0.3
Author: [email protected]
TABLE OF CONTENTS
1 INTRODUCTION...............................................................................................................................................1
2 JARPROTECTOR.JAR.....................................................................................................................................1
3 JARSTARTER.JAR...........................................................................................................................................2
4 THIRDPARTY FRAMEWORK..........................................................................................................................3
ABSTRACT JarProtector is a java application to encrypt jar files. The encrypted jar files are protected
from extraction and decompilation. JarStarter is a java application to start other java
applications with encrypted jar files in class path. This document describes the usage of
JarProtector.
TECHNOLOGY JarProtector is based on a Decryption ClassLoader which is able to load the encrypted
class files direct into the native JVM.
2 JARPROTECTOR.JAR
The main argument to JarProtector.jar is a separated list of jar file paths (relative or
absolute). The path separator is operating system dependent:
Windows: semicolon
Mac OS X: colon
Linux: colon
For each jar file in main argument, an encrypted car file is created in the same location
as the jar file exists. In the example above the car files ./path/to/my1st.car and
./path/to/my2nd.car will be created.
The optional argument -jre [path] can be added multiple times and defines the JREs, the
application is allowed to run with. The application will fail if an unknown JRE tries to start
the application. This helps to prevent attackers to use their customized JRE.
VERSION Example:
HELP Example:
LICENSE When you run JarProtector for the first time, you are requested to enter the serial
number received by email.
3 J A R S TA R T E R . J A R
ABSTRACT JarStarter.jar is used to start a java application with encrypted jar files in classpath.
JarStarter.jar will be distributed with previously generated car files to your customer.
java -cp
JarStarter.jar;./path/to/my1st.car;./path/to/my2nd.car;t
hirdparty.jar com.bfa.JarStarter com.my.App arg1,
arg2, ..., argn
Set the classpath as usual, including the previously generated car files. Add the
classname 'com.bfa.JarStarter' as first argument to start JarStarter. All other arguments
are the same as you would use to start your application without JarStarter. com.my.App
is the class containing the main method of your application. arg1 ... argn are the
arguments used by your application.
JarStarter returns the exit code of your application or an exit code != 0 if your application
could not be started.
HELP Example:
4 T H I R D PA R T Y F R A M E W O R K
ABSTRACT JarProtector uses its own ClassLoader to decrypt the protected classes/resources during
runtime. If you use a thirdparty framework or API to access the protected
classes/resources, you have to configure the framework/API to use the JarProtector
ClassLoader. Otherwise, the protected classes will not be visible/valid for the
framework/API. You can access the JarProtector ClassLoader in your applications main
method: