Skip to main content

Bootstrap 1.0 available

2 replies [Last post]
Joined: 2004-05-30

Bootstrap is a very simple and non-intrusive bootstrapping utility for Java applications. No more bats and sh scripts with evergrowing classpath hacks.

License: Free for all use

See more details in the readme file.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-06-10

Hi nnevatie,

Do you have a little description, what exactly Bootstrap 1.0 does? Thanks in advance.


Joined: 2004-05-30

Sure, this is taken from the readme.txt in the package:

--- snip ---
Bootstrap Readme

What is Bootstrap exactly?

Bootstrap library is a two layered utility to help with polishing Java
applications and their usage. It is designed to be as non-intrusive as
possible. Bootstrap frees the user from:

- Using ugly startup scripts (.bat, .sh, etc.) with evergrowing lines
of classpath wizardry.

- Exposing internal workings of the application to the user

Bootstrap is free (as in free for everyone to use for everything) and
comes with full source code.

To start using Bootstrap immediately, take look at the output directory.

Two layers

Bootstrap contains two separate layers, which have no dependencies
with each other. The first layer, written in pure Java, deals with Java
classpath issues quite elegantly. The second layer is a multipurpose
native launcher, written in C++, for the Win32 platform (for now).
The launcher has various properties which are described later.

The Java classpath layer

The actual Bootstrap utility is a plain Java library (namely bootstrap.jar),
which can be used to make the launching of Java applications somewhat
easier and less error prone. The idea is that Bootstrap is capable of
including different components in the Java classpath, before the actual
application is executed (its main method is called by Bootstrap).

The default Bootstrap classpath contains the current working directory and
the ./lib -directory. When a directory is given to Bootstrap, it appends
every .jar file in that directory to the classpath. The directory itself
is also included to the classpath.

Consider the following example:

java -jar bootstrap.jar mypackage.MyClass

The previous line would include every jar in ./lib directory to
the Java classpath and then run the class mypackage.MyClass.

To further control the Bootstrap path, the user can use the
following definition:

java -DBootstrap.path=mylibrary.jar:mydirectory:lib -jar bootstrap.jar mypackage.MyClass

Now, Bootstrap would add mylibrary.jar as well as mydirectory and lib directories to the
classpath and the run the application.

Using Bootstrap to control the classpath behaviour of a Java application, does not affect
the performance or functionality of the application in any way.

The native launcher layer

The native launcher consists of two components: a single executable file and a descriptor for
the executable. For instance "myapplication.exe" and "myapplication.ini". The idea is to
use the same executable for each application - the descriptor file name is derived from the
executable file name at runtime - the only rule is that the descriptor must have the same
name as the executable, only with .ini -extension.

An illuminating example of the descriptor file (.ini):

jvm = path/to/java.exe
jvm-arguments = -Dkey=value -Xmx100M
working-dir = .
classpath = lib/mylibrary.jar
main-class = mypackage.MyClass
main-arguments = $ARGS$
show-window = false
window-title = My Console

The explanation of the attributes:

jvm -> Controls the JVM with which to launch the application. Relative paths are allowed.
jvm-arguments -> Controls the JVM arguments. Optional (leave empty).
working-dir -> Controls the working directory in which the JVM is executed.
classpath -> Controls the Java classpath. Use normal delimiter ';'.
main-class -> Controls the Java main class to be executed.
main-arguments -> Controls the main class arguments. $ARGS$ is a special tag, which gets replaced
with the command-line arguments (only applicable to main-arguments value)
show-window -> Controls whether to show the console window during the execution of application.
window-title -> Controls the optional console window title.

# characters can be used to start a comment line.

Native launcher icons

To change and customize the launcher icon, you can download a free tool called ResHack
(see details below).

Just copy the ResHack.exe to the same folder with your application launcher and drag&drop
an icon file (.ico) onto the Bootstrap launcher executable - the icon will be changed and a
new executable will be created (with the name changed to "originalname_new.exe"). You can
also change the icon by giving the icon name as a parameter to the launcher, as follows:

mylauncher.exe myicon.ico

The launcher is only available for Win32 at the moment, but could be ported quite easily
to *nix-like platforms (standard C++ source included, compilable with GCC/MinGW).


ResHack is free software, but its distribution is limited to the official
homepage only.

Resource Hacker can be found at:

Bootstrap is (C) 2004 N. Nevatie
--- snip ---