| JLoader |
|---|

JLoader is an open source java installer that compresses class files into a single one using ZIP format. On running, it dynamically loads classes; instead of saving them.
Requires a Java Virtual Machine that supports Sun's JDK 1.1 or later.
The idea is that you can append anything to class file. Your application files are zipped and appended to a 5 KB loader class that unzips and dynamically loads class files and saves other files to their original location.
Generated class Loader class
![]()
Application
JLoader is composed of two classes:
- JLoader.class which is the default loader class used to extract zipped information appended to itself.
- Packager.class which is responsible for packaging application files to a self-extracting class file.
You may get confused as the class name gives nothing about what is really inside, consider the following:
Packager.class
OR
JLoader.class Loader class
![]()
Packager
run
output/JLoader.class
Loader class
![]()
Application
The first JLoader.class contains Packager, by running it (or Packager.class), you will get another generated JLoader.class (in output subdirectory), which contains your application. You should always know what is appended.
After unzipping JLoader.zip you will find a JLoader.class, remember that it contains Packager, so running
is equivalent tojava JLoader parametersjava Packager parameters
Syntax:
java JLoader [-options] entry_classWhere:
entry_classis the fully qualified entry class name (withmainmethod), without.classsuffix.Where
optionsinclude:
-includename_extfile names and extensions to include (default: all files)
-excludename_extfile names and extensions to exclude (default: none)
Where:
name_extcase-sensitive pathnames or
Extensions (without '.')
separated by semicolon.
Example 1:
java JLoader mypackage.MyEntryClasswill include all files in the current and sub-directories; the entry point of the program is
mypackage.MyEntryClassExample 2:
java JLoader -include class;html;jpg
-exclude delme/temp.html EntryClasswill ONLY include class, html, and jpg files, but not
delme/temp.html.
-include is used,
only those specified will be included; otherwise all files will be included.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.Click to download (includes source code).
main method) is declared to be package
private i.e. without the public modifier, you will have
IllegalAccessExceptionmain method even in package private classes, but JLoader depends on
Method.invoke(Object, Object[])ClassLoader.defineClass(String, byte[], int, int)
Copyright © 2000 Ahmed Ashour. Distibuted under GPL-2 license
http://www.geocities.com/asashour/jloader
Last update: 31st July, 00