Taurus Java Virtual Machine v1.06a

The following release notes are applicable to the above version of the Taurus Java Virtual Machive. The copyright notice is applicable to any version of the VM unless stated otherwise.

Copyright notice
The Taurus Java Virtual Machine is © Copyright 2003, Taurus Software.

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.

The Taurus Java Virtual Machine has been produced, as a "clean room" implementation, in accordance with Sun Microsystems, Inc's (SUN) licence agreement for "The Java™ Virtual Machine" specification. Also, in accordance with this agreement the virtual machine distribution does NOT, to the author's knowledge, contain ANY material which is copyrighted by SUN. As such the class files relied upon by the virtual machine must be obtained separately, directly from SUN. The use of this specifcation does not in any way imply that the software conforms to it, nor does it imply that it will ever wholey do so. The Taurus Java Virtual Machine does not, and will not, ever pretend to be "Java-compliant", it will always remain as closer approximation as time and money will allow. Users of this software do so at their own risk. Developers of any Java software should NEVER use this as a reference platform.

Taurus Java Virtual Machine is a trademark of Taurus Software. Sun, Sun Microsystems, the Sun logo, Java, JavaSoft, Personal Java, Embedded Java, KVM and Java 2 Micro Edition are all trademarks or registered trademarks of Sun Microsystems, Inc. All other product names mentioned herein are the trademarks of their respective owners.

All references to Taurus Software directly refer to the non-profit freeware/shareware software development unit run from the UK by myself. Any conflict with names of companies inside or outside of the UK is unintentional and should be disregarded.

Platform Support
The Taurus Java Virtual Machine version 1.06 alpha is provided as binaries for the following platforms:

For space reasons is provided without any of the required support libraries (DLLs, .so or RMs). In order to run this software you must install these libraries yourself (they are likely to be already installed on most systems). Binaries for other platforms may follow at some later date.

Java Support
This alpha release provides an incomplete implementation of the SUN Java Virtual Machine Specification 1.0. The key features of this release are as follows:

The main restrictions are as follows:

Support for "Standard Applications"
Below is a table of the "standard Java applications", which come with most JVM's. They are all written in Java, so should run on any virtual machine. As a simple test of the Taurus Java VM, here is what happens when they are run with the scripts provided:

Application Status Comments
appletviewer Will not run Needs Threads and native AWT support.
jar Will not run Needs native Zip support.
javac Runs Compiles Java code correctly.
javadoc Runs Successfully documents my Hello.java example
javakey Runs buggily Always prints the message "could not initialize scope".
javap Don't know I don't have all the class files for javap to test it.
jdb Will not run Needs native network support.
native2ascii Runs But I don't know what it does!
rmic Runs Generates and compiles RMI stubs and skeletons correctly.
rmiregistry Will not run Needs native network support.
serialver Runs Produces correct UID as Sun's implementation.

Installation
The Taurus JavaVM is shipped as an archive (usually ZIP) without the standard class files. If you haven't done so already, you need to download a copy of JDK 1.1 from java.sun.com. Pick the latest 1.1 release.

Win32, Linux and Cygwin
Create a suitable directory (e.g. C:\JavaVM or /home/robert/javavm), and unpack the downloaded ZIP file containing the VM into this directory.

Next install the class files from the JDK 1.1.x - these come packed as a zero compression Zip file called classes.zip, approx 8Mb in size. You need to unpack this directly into your JavaVM lib directory (You may need to create this, if there isn't one already).

RISCOS
Unpack the downloaded ZIP file using !ZipEE or similar into a suitable directory e.g. $.Apps. This will create an !JavaVM application directory containing the necessary files.

Next install the class files from the JDK 1.1.x - these come packed as a zero compression Zip file called classes.zip, approx 8Mb in size. You need to unpack this into $.Classes (unlike !JavaVM, this cannot be moved anywhere else). You then need to rename all the files to remove the .class file extensions.

Running
Running JavaVM is very simple, and it is designed to be run in a similar way to other virtual machine implementations.

Win32, Linux and Cygwin
To run the VM you must either add JavaVM's bin directory to your path, or if you have other VM's installed, you must cd to this directory and type, for example, .\java (Win32) or ./java (Cygwin and Linux).

To run your own programs, you must place your .class files in the lib directory along with the standard Java classes.

RISC OS
Before you can run the VM under RISC OS, you must first double-click the !JavaVM application. This doesn't actually launch an application, it just sets up various environment variables, adds the VM's bin directory to you path and loads the appropriate modules.

To actually run the VM, open a Task Window (Ctrl+F12). As with most large programs, you need to increase the wimpslot of the task with wimpslot -min 3000k for example. Larger programs will need a bigger wimpslot. The VM is then run by typing, for example, java, in the same manner as other platforms.

To run your own programs, you must place your .class files in the $.Classes directory along with the standard Java classes.

Testing the VM
To make sure that the VM is setup properly and that you are running the right VM (if you have more than one installed), run the VM with the -version switch. This should result in something similar to the following:

robert@odie$ ./java -version
java version "1.1"
Taurus Java Virtual Machine CYGWIN32 v1.0.6a DBG
(C) Copyright 2001, Taurus Software

If you don't get this, or you get a similar message which does not contain the word "Taurus", then check your path, or make sure you are using .\java -version (Windows) or ./java -version. On RISC OS make sure you have double-clicked !JavaVM.

Minimum requirements
The VM can function in a much smaller environment than provided by the JDK classes. If you wist to implement your own "standard" classes, then the VM really only needs the following classes and methods to function:

Class Usage
java.lang.Object All classes derive from it, either directly or indirectly.
java.lang.System Loaded at system startup.
  • initializeSystemClass()
Called at system startup.
java.lang.Thread For the "main" thread object.
java.lang.ThreadGroup For the "system" thread group.
java.lang.String For strings (Note: this can be cut down a lot).
java.lang.Throwable For all exceptions and errors.
java.lang.Error For all errors.
java.lang.Exception For all exceptions.
java.lang.InternalError Can be generated by any field or method access.
java.lang.NullPointerException Can be generated by any field or method access.
java.lang.ArrayIndexOutOfBoundsException Can be generated by any array access
java.lang.ArithmeticException Can be generated by maths ops (e.g divide by zero)
java.lang.ClassCastException Can be generated by any explicit or implicit cast.
java.lang.ClassNotFoundException Generated by dynamic loading.

It is also advisable to include the following error/exception classes, as they can be raised directly by the VM (either in response to class-loading or by being thrown by native method implementations):

Class Usage
java.lang.VerifyError Can be raised by the verifier.
java.lang.NoClassDefFoundError Can be raised by the linker.
java.lang.IllegalAccessError Will be used in future releases.
java.lang.ClassFormatError Raised by the loader when it encounters a corrupt class file.
java.lang.NoSuchFieldError Will be used in future releases (1.06a erroniously raises NoSuchMethodError's instead).
java.lang.NoSuchMethodError Raised by the VM in response to incompatible class changes.
java.lang.UnsatisfiedLinkError Raised by the VM when linking fails.
java.lang.IOException Can be raised by native I/O methods.
java.lang.NegativeArraySizeException Can be raised by the VM when dereferencing arrays.

To make your own environment, you need to implement a set of Java classes similar to those provided by Sun. The main reason for doing this on a small platform is the amount of crap that gets loaded before any of your classes. I am currently looking at the Personal Java and Embedded Java specifications for some ideas on how to shrink the VM - Just using System.out loads an awful lot of classes!


Last updated 28th January 2003
Comments support at tsac.co.uk

1