0% found this document useful (0 votes)
146 views5 pages

Jar Protector: User Manual

This document describes how to use JarProtector and JarStarter to encrypt Java application JAR files. JarProtector is used to encrypt JAR files, creating encrypted CAR files. JarStarter is then used to launch applications that contain encrypted JAR files in their classpath. The document provides instructions on using both tools from the command line, including specifying allowed JRE versions and viewing help/version information. It also notes that third party frameworks may need to use the JarProtector classloader to access encrypted classes and resources.

Uploaded by

firman syah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
146 views5 pages

Jar Protector: User Manual

This document describes how to use JarProtector and JarStarter to encrypt Java application JAR files. JarProtector is used to encrypt JAR files, creating encrypted CAR files. JarStarter is then used to launch applications that contain encrypted JAR files in their classpath. The document provides instructions on using both tools from the command line, including specifying allowed JRE versions and viewing help/version information. It also notes that third party frameworks may need to use the JarProtector classloader to access encrypted classes and resources.

Uploaded by

firman syah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

JAR PROTECTOR

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

JAR PROTECTOR USER MANUAL TABLE OF CONTENTS


1 INTRODUCTION

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.

PACKAGE JarProtector consists of two jar files:


JarProtector.jar: Used to encrypt and protect jar files.
JarStarter.jar: Used to start java applications with encrypted jar files in classpath.

2 JARPROTECTOR.JAR

ABSTRACT JarProtector.jar is used to encrypt jar files.

STANDARD CALL Example:

java -jar JarProtector.jar


./path/to/my1st.jar;./path/to/my2nd.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 exit code is 0 on success, != 0 on failure.

JAR PROTECTOR USER MANUAL Page 1


EXTENDED CALL Example:

java -jar JarProtector.jar ./path/to/my.jar -jre


./path/to/jre8 -jre ./path/to/jre9

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:

java -jar JarProtector.jar -version

Shows the version of JarProtector, JRE and OS.

HELP Example:

java -jar JarProtector.jar -help

Shows the usage of JarProtector.

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.

STANDARD CALL Example:

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.

JAR PROTECTOR USER MANUAL Page 2


VERSION Example:

java -jar JarStarter.jar -version

Shows the version of JarStarter, JRE and OS.

HELP Example:

java -jar JarStarter.jar -help

Shows the usage of JarStarter.

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:

public static main(String[] args) {


ClassLoader clsLoaderJarProtector =
MyApp.class.getClassLoader();
...
}

JAR PROTECTOR USER MANUAL Page 3

You might also like