The Eve Virtual Machine and SDK

 

SDK Documentation    Downloads    Forum

Is Eve an Evolution of Ewe?

 

The major underlying difference between the old Ewe VM and the new Eve VM is that Eve supports the Java Thread API. This includes the Thread class, and the synchronized/wait()/notify() keyword and methods.

 

This difference has two major implications:

  1. The native VM had to be rewritten completely.
  2. The Java libraries had to be substantially rewritten.

 

However the main benefit of supporting Java threading makes the major work involved completely justifiable: now standard java.xxx classes could be used in the library instead of ewe.xxx classes which mimicked their java.xxx counterparts using the workable, but incompatible Ewe threading model. Thus, instead of having eve.io.InputStream classes, the java.io.InputStream class could be used instead. This principal applied to dozens of classes. Hence the main difference in the runtime class libraries are:

 

Large numbers of ewe.xxx classes have been discarded and replaced with standard java.xxx classes.

 

This immediately relieves the vast majority of porting problems when writing applications for the Eve VM. Not only do far fewer new classes have to be learned (standard Java classes would work most of the time) but existing applications and libraries could be far more easily ported to the VM.

 

The other major change is in the GUI. The functionality and look of the GUI in the new VM is almost identical to that of Ewe but with a much better naming convention and better organization of classes into separate independent packages.

What is Eve?

Eve is a portable Virtual Machine that executes Java byte code (i.e. Java “.class” files) and has been specifically designed to run well on mobile devices as well as on the desktop. Standard Java started on the desktop and attempted to scale down to mobile devices with (unsurprisingly) little success. Eve started on mobile devices and scaled up. The result is VM that performs well on all devices and provides APIs that are mobile aware instead of forcing mobile devices to emulate desktop systems. Other mobile oriented features include:

 

Eve Compared to Standard Java

 

Like other Java Virtual Machines, Eve comprises of a natively executable VM along with a library of Java classes. On Windows and Linux desktop systems the VM is a single executable called eve.exe (on Windows) or eve (on Linux). On Windows Mobile systems it is split between a small executable launcher eve.exe and the VM itself in a DLL called eve.dll.

 

The Eve VM executes Java class files according to the Java Virtual Machine specifications. However the standard class library associated with the Eve VM does not conform to any of the numerous Java standards. The decision to not follow any particular standard was taken since Eve was designed to be portable from devices as small as Smart Phones to full desktop computers. Currently, no Java standard works well on all devices. Java Micro Edition (JME) is too limited for any device larger than a Smart Phone, the Java Standard Edition (JSE) simply cannot fit and run on the vast majority of mobile devices, and PersonalJava has apparently been abandoned.

 

The only Java standard that Eve will attempt to eventually implement is MIDP. The class library of the Eve VM is currently being extended to implement the MIDP 2.0 standard since the MIDP’s limited functionality is already a subset of the capabilities of the VM and there are many MIDP applications currently in use.

 

Important Information on the Eve Class Library

 

All classes in the Eve class library are either in java.xxx packages or in eve.xxx packages. It is important to note the following points about the java.xxx library.

 

 

 

In short, the java.xxx packages and the classes contained therein in the Eve class library can be thought of as a compatible subset of the Java 2 library. This means that a Java application written to specifically target the Eve VM can also be run by a standard Java 2 VM. But applications targeting the Java 2 library will not necessarily work on the Eve VM.

 

A JAR file is provided (“eve.jar”) which contains all the eve.xxx classes customized as necessary to run on a standard Java 2 VM. Therefore it is possible to use a standard Java 2 VM (such as Sun’s Java VM) to run Eve applications by placing this JAR file within the classpath. In fact, this is the recommended way to test Eve applications during development.

 

Using a command line you would run an Eve application with the main() method in the class called my.class.name using the native Eve VM like this:

 

eve -cp <my/class/path> <my.class.name> [program arguments] …

 

Or you could run the same application using a Java VM like this:

 

java -cp eve.jar;<my/class/path> Eve <my.class.name> [program arguments] …

 

Note that the only differences are the inclusion of eve.jar in the classpath and the fact that class that you must always run is Eve (case sensitive). The “Eve” class (contained in eve.jar) initializes critical parts of the Eve VM library and then proceeds to execute the specified application class file my.class.name.

Writing Applications for the Eve VM.

 

Writing applications for the Eve VM is no different from writing for any other Java VM and virtually any Java IDE or command line compiler will compile Eve applications. Eclipse is recommended because it is powerful, cross-platform and free.

 

In order to write and compile Eve applications you will need two items, both of which are included in the SDK.

 

  1. The javadoc generated Eve API documentation.
  2. The file CompileEve.zip which contains the class libraries needed for compilation.

 

In order to debug Eve applications using a Standard Java VM you will need the file: JavaEve.zip. This file contains the pure Java versions of all classes in the CompileEve.zip file along with their source code. This allows you to trace into the source code of the Eve library if needed. Additionally the DLLs java_eve.dll (on Windows) and  libjava_eve.so (on Linux) are included and are needed to allow the Java VM to provide functionality provided by the Eve VM but not in standard Java libraries.

 

In order to run Eve applications using the native Eve VM you will need to install the desktop version of the Eve VM on your computer.

 

In order to run Eve applications using the Standard Java VM you can again use JavaEve.zip but you can also use eve.jar which contains the same classes as JavaEve.zip but without the source code and without debugging information. It therefore provides the same runtime library but is much smaller.

 

For details on how you would setup an IDE such as Eclipse to compile and debug Eve applications please see this file and select Beginners Programming Guide.

Capabilities of the Eve VM.

 

General Capabilities

 

 

 

 

Mobile Device Specific Features

 

 

 

 

Unique Developer Tools

 

 

Architecture of the Eve VM.

 

The Eve VM and library is designed to be very modular – far more so than the Ewe VM. The libraries for the VM and the types of devices that are available generally suggest four possible incremental versions of the VM.

 

 

A Mobile Edition can be upgraded to the full Desktop Edition by simply installing a single eve-extended.eve file into the same installation directory as the VM itself.

The Eve Libraries

 

Eve Embedded (Command Line) – This include the following packages:

 

Eve Mobile Edition, contains these additional packages:

 

Eve Desktop Edition, contains these additional packages:

 

Customizing the Eve VM

 

Replacing/Reducing the Java Library

The Eve VM consists of a native executable which will vary in size between 700KB to 1MB depending on the target platform, and a Java class library 3MB in size for the full desktop version (a full 1MB of which is used by the eve.ui libraries). In devices where space is at a premium, customized versions of the VM can be produced with a more limited class Library. Utilities to do this customizing will soon be made available to developers.

 

Customizing/Replacing the UI

The Eve VM implements the user interface in two distinct layers. The lowest levels are contained in the packages: eve.fx, eve.fx.gui, eve.fx.sound. These are very basic APIs and expose the lowest levels of user interface provided by the underlying system. This includes classes representing a Window (or the devices drawing area if true windows are not present), Graphics contexts for drawing onto Windows and Images, and simple event trapping for Window changes, pen/pointer events, key-press events, resize events, paint events, macro text events and input panel events.

 

The eve.ui packages are all built on top of the eve.fx and eve.fx.gui libraries but are not used by any other packages, allowing them to be completely replaced by any other GUI library. An AWT or SWT or even SWING library could be implemented over the eve.fx packages.