Contents of this document

What is JUMP

JUMP is a bytecode compiler that allows JAVA developers to compile JAVA* source code. It generates portable bytecode that conforms to the JAVA VM specification and can be executed by any JAVA VM.

JUMP is a replacement for the JAVAC compiler that ships with Suns JDK. Like JAVAC it is a 32-Bit console application which can be easily integrated in an existing development environment. It is written in a portable manner and available under several platforms including Microsoft Windows** 95, Microsoft Windows NT, OS/2*** and LINUX.

JUMP extends the capabilities of JAVAC in the following ways:

Extensions to the JAVA language

Operator overloading

JUMP currently extends the JAVA language in enabling the programmer to use operator overloading for classes. Operator overloading is a very powerful feature, that can make the use of classes ( e.g. mathematical classes ) very natural and easy. The syntax for the operator overloading is the same as in C++ ( see the example complex.java ).

The following unary prefix operators might be overloaded:

The following unary postfix operators might be overloaded:

The following binary operators might be overloaded:

The '=' operator can't be overloaded since it is the only predefined assignment operation. If the '==' and '!=' operators are overloaded the default comparison operations for the corresponding classes are hidden.

Default Parameters

JUMP extends the JAVA language in enabling the programmer to declare methods with default parameters. Default parameters allow the programmer to call a method without specifying all parameters the method expects. The compiler automatically provides the missing parameters with the specified default values.

Use of default parameters in programs reduces the amount of code to write and makes the source easier to read and understand.

The file complex.java demonstrates the use of operator overloading as well as default parameters.

Class templates

JUMP also allows to define and use class templates. Templates are very useful to create generic types, e.g. typesafe containers. Templates are a very powerful feature that allow developpers to write code independent of types. Generic types are an essential feature for typesafe languages in large projects to reduce the amount of code to write and to make programs better maintainable. In C/C++ in the absence of templates the prepocessor has been (ab)used widely to provide some kind of generic type. Since JAVA has no prepocessor the need for a template mechanism is even bigger than in C++. Use of template classes is not only more safe than using non-type specific classes, it also produces faster programs since type casts can often be avoided.

When the compiler sees a declaration of a template class it produces a template_name.class file that contains all neccessary information to instantiate classes for this template declaration. The file doesn't contain any bytecode. When the compiler sees a template instantion the compiler uses this file to generate the code for a instantiated template class with the specified types.

The syntax is for declaring a template is derived from C++ and looks like this:

The file JumpSet.java demonstrates how a template class can be defined.

A template is instantiated when the compiler sees it the first time. A unique name for the instantiated class is generated that consists out of the template name plus something that identifies the template parameters uniquely. This name guarantees that a template for each combination of parameters is intantiated only once. The instantiated class belongs to the same package the template belongs to.

Global variables and functions

JUMP supports the declaration and use of global variables and functions via namespaces. To declare global symbols a namespace declaration at the beginning of the source file is required. The namespace statement defines the name of the class, where the symbols are stored. All symbols are automatically stored as public and static to be accessible from any other instance.

Use of the defined global symbols is possible if you import the namespace with the using-clause, e.g.

using namespace java.lang.Math;
using namespace java.lang.System;

The using-clause should be used before any import-statement. Public static symbols imported via the using namespace clause are accessible without any, e.g.

is a valid statement after classjava.lang.Math has been imported via using namespace. The file complex.java demonstrates the declaration and the use of global functions and variables.

Download

Download the JUMP Compiler as a compressed file for Microsoft Windows 95 / Windows NT or the LINUX operating system.

Package Contents

The original distribution archive contains the compiler executable file and some sample source files which demonstrate the usage of JUMP:

jump[.exe] The compiler executable
jump.html This file
complex.java Shows the use of operator overloading and namespaces
JumpSet.java Provides a very efficient container template class
JumpSortedSet.java Provides a sorted container template class
Sort.java Typespecific sort algorithms
BinPredicate.java
UnPredicate.java
Iterator.java
Container support files
Demo.java JAVA source that shows how to use the container template class and that also does some benchmark comparisons

Installation

The JUMP compiler is one compressed downloadable files. The compiler executable needs to be unpacked in a directory in your executable path. The examples and jump.htm might be unpacked in an extra directory.

How do I use JUMP ?

JUMP is a commandline compiler. You call it with the name of the file(s) to be compiled or disassembled. Include any other commandline switches before the class name. The syntax to use JUMP looks like this:

Best usage of JUMP is generally achieved if you integrate JUMP in your development environment. How you can do this is described later.

Supported commandline switches:

-cl[asspath] <path>

Defines where JUMP looks for your JAVA classes. Without that switch JUMP looks in all directories specified in the CLASSPATH environment variable.If you set the -cl switch, JUMP will ignore the CLASSPATH environment variable and search the directories specified on the commandline. Multiple directories must be separated by a semicolon.

Example:

This command compiles all source files with the extension .java in the directory /src. Classes are searched in the file c:\java\bin\Classes.zip and in the current directory. The class files are stored in the corresponding source directory.

-d <dir>

For every class defined in each source file compiled by JUMP, the compiler stores the resulting bytecodes in a class file with a name of the form classname.class. If you do not specify the -d option, the compiler places each class file in the same directory as the corresponding source file. If you specify the -d option the compiler uses the specified path as the root directory of the class file hierarchy and stores the file in a subdirectory corresponding to the packeage name.

Example:

causes the class files for the classes in the SourceFile.java source file to be saved in the directory e:/java/classes/comp/src, assuming that the classes are defined in the package comp/src.

Note that the -d and -classpath options have independent effects. The compiler reads only from the class path, and writes only to the destination directory. It is often useful for the destination directory to be on the class path. If the -d option is not specified, the source files should be stored in a directory hierarchy which reflects the package structure, so that the resulting class files can be easily located.

-g

Enables generation of debugging tables. Debugging tables contain information about line numbers and local variables - information used by Java debugging tools. By default, only line numbers are generated, unless optimization (-O) is turned on.

-x

Disables the extensions to the JAVA language standard defined by Sun. The source code compiled must conform to the language standard version 1.0.

-v[erbose]

Causes the compiler and linker to print out messages about what source files are being compiled and what class files are being loaded.

-nl

This switch prevents JUMP from priniting the source line where an error occured. If you do not specify the -nl option the compiler prints out the source line and the column where an error occured in addition to the error message.

This option is useful to integrate the compiler in an existing environment. In this case the output is usually redirected to a message window and the corresponding source line will be shown if you click on an error.

-ef <format>

This switch allows you to specify the format of the information string the compiler prints out in case of an error. By default the compiler prints the source file path and name, the linenumber in braces followed by the errortext, for example:

You might wish to change the default format to make it readable by your editor/ development environment. You can specify your desired output format as a string. The following codes represent placeholders:

The default format string is is "$F($L): ". The format string "$F:$L:" makes the output look like the one Suns javac produces. Another example:

would print out an error information like this:

-max <num>

Specifies the maximum number of errors per source file before the compiler stops compilation. The default value is 25 error per source file.

Can I use JUMP with my favorite development environment ?

JUMP can easily be integrated in most development environments. Through the commandline switches -ef and -nl you can modify the output format of JUMP as needed, so that your development environment can interpret the generated output.

As an example the following list describes the steps neccessary to integrate JUMP into Microsoft Developer Studio*:

  1. Select the Menu Tools-Custmize. The Customize window is shown.
  2. Select Tools and Add. The Add Tool window is shown.
  3. Select Browse and locate the JUMP compiler in your filesystem.
  4. As Menu text write "JUMP", as Arguments write " -nl $(FilePath)" and as Initial directory write "$(FileDir)". Select Redirect output to window and close the window.

You will find JUMP now in your Tools menu and you can select it to compile the current file. You can also assign a hotkey to JUMP in the menu Tools - Customize - Keyboard.

If you have another favortite environment the manuals should describe how to embed third party tools.

A detailed explanation how to use JAVA with Microsoft Visual C++ can be found in the document Using Microsoft Visual C++ for Java development.

Motivation and Future plans

JUMP has been developped as part of a larger project. Since JUMP can be used as an isolated tool and might be of use for JAVA developers it is made available to the public. Through public use and feedback we hope to be able improve the acceptance and quality of the JUMP compiler in the future.

The current beta version of JUMP has the release number 0.98. So far it has been tested to be reliable, although we expect that some bugs still do exist. Currently the focus lies on releasing version 1.0. The time frame depends on the response from users of JUMP. The next release is already under development and will cover extensive language enhancements making JAVA a superior language for develing business applications.

With your support JUMP will be the most powerful and fastest compiler for enriched JAVA source, helping you to reach your project targets faster.

Reporting Bugs, Comments and Feature Requests

Your comments are important to making this release successful. We are committed to fixing bugs for the 1.0 release, and will also use your feedback to help plan future releases. Please report bugs, request features and submit comments as noted below.

Although the program has been carefully tested and verified so far, the program is still under development and we expect that bugs do exists. If you discover a problem with the program, please report it to DeHoeffner@compuserve.com..

To assist us in finding the source of your problem, we need information about the version of JUMP you are using and what input JUMP was not able to handle properly. The best for us to determine what happened is for you to send us the smallest possible offending section of code, that makes reproduction of the bug possible. If for confidential or another reason you cannot mail us the offending code section, please describe what types of constructs you used in your source where the error might have happened.

License

JUMP version 0.98 is:

Copyright (C) 1995 - 1997 by Detlef Hoeffner. All rights reserved.

License is hereby granted to use this version of JUMP for compiling your Java programs without restriction. You are also free to distribute the JUMP system provided that (1) the entire JUMP package, including this license, is distributed and (2) no fee for redistribution beyond the cost of any physical distribution media is assessed.

Any site which claims (whether explicitly or implicitly) to be a mirror of the JUMP site is obliged to maintain the most current copies of software and documents, and to mirror the entire site.

All bytecode programs compiled with JUMP are yours.

For information about commercial distribution licenses, please contact us at the email address below.

Feedback and contact

We are interested in any suggestions, requirements and opinions. Please send your feedback to DeHoeffner@compuserve.com.

    Contact:

Dipl. Wirtsch.-Ing. Detlef Höffner
DV- und Organisationsberatung
Landgraben 11
74206 Bad Wimpfen
Germany
Tel.    +49 7 0 6 3 / 6 6 0 0
FAX: +49 7 0 6 3 / 6 6 2 0

Disclaimer

JUMP Copyright (c) 1997 by Detlef Hoeffner.

DISCLAIMER: THIS PROGRAM IS PROVIDED AS IS, WITHOUT ANY WARRANTY, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO FITNESS FOR A PARTICULAR PURPOSE. THE AUTHOR DISCLAIMS ALL LIABILITY FOR DIRECT OR CONSEQUENTIAL DAMAGES RESULTING FROM USE OF THIS PROGRAM.

* JAVA is a trademark of Sun Micorsystems, Inc.
** Windows is a registered trademark of Microsoft Corporation.
*** OS/2 is a registered trademark of IBM Corporation.