This page explains how to install the Technology Preview of Magik on Java and the Desktop Viewer:

Prerequisites

Magik on Java should work on any recent Java 7 Virtual Machine (JVM) running on Windows, but it has only been tested on the following platforms:

  • Windows 7 (32 and 64 bit)
  • Windows Server 2008 R2 (32 and 64 bit)

To install Java 7, go to http://www.oracle.com/technetwork/java/javase/downloads/index.html

  • If you are on a 32-bit machine, download the 32-bit JDK (not the 32-bit JRE)
  • If you are on a 64-bit machine, you can download either the 64-bit JDK or JRE

Magik on Java runs best on the most recent Java 7 update (currently update 21). It doesn’t run on the initial Java 7 release from Q3 2011.

Desktop Viewer

You can only run the Desktop Viewer on the Cambridge Database. This example database is installed as an optional part of a Smallworld Core Spatial Technology installation. Magik on Java is compatible with Smallworld Core 4.3.0.

The Desktop Viewer currently consumes a lot of memory when run on Magik on Java. Until that memory footprint is reduced, you may find that you can’t run the Desktop Viewer on some 32-bit machines because of process size limits.


Installing Magik on Java

To install Magik on Java, unzip magikonjava-install.zip to any new folder on your machine. Once installed the directory will have the following contents:

Folder Details
/demo Contains demonstrations of Magik on Java functionality
/etc Contains the ACPs required by Magik on Java
/libs Contains all the JAR files and OSGi configuration needed to run Magik on Java
/licences Contains details of the Open Source licences
/sw_core Contains the Magik resources and source shipped with Magik on Java
start_magik_cli.bat Starts a CLI that can be used from EMACs. See Using Emacs.
start_magik_console.bat Starts a console application that can be used to interface with the Magik on Java compiler. See Using the console.

Troubleshooting your Java installation

Checking the Java version

You can run java –version in a command prompt to verify the version. If Java 7 is the preferred version, you will see output like:

java version "1.7.0_21"

The key thing is that the version string should start with 1.7.0.

Changing the Java version

If you have installed Java 7 but java –version shows an older version, set the PATH environment variable before running the Magik on Java launcher, start_magik_console.bat:

set PATH=<path to java directory>\bin;%PATH%
start_magik_console.bat

Note: Put the path to the Java directory as the first entry so that no other subsequent entry changes the path to Java.

Details of Java versions

Java versioning is a little complicated. This section explains all the details.

The Java Virtual Machine comes in server and client versions. This StackOverflow link explains in detail the difference between the two, but the key thing for Magik on Java is that Magik on Java runs better on the server version. The console launcher checks that you are using the server version.

The following discussion explains the variables that control whether you have the server virtual machine available.

In summary:

  • If you are using a 32-bit JRE, switch to the 32-bit JDK.
  • Use the PATH trick above to force Magik on Java to use a particular Java version.

In detail:

  • Java installer type. Java ships as either:
    • a JDK (Java Development Kit, nominally for developers only), or
    • a JRE (Java Runtime Environment, for everyone else).
  • There are separate 32-bit and 64-bit versions of both the JDK and the JRE.
    • 32-bit machines require 32-bit Java
    • 64-bit machines can run either 32-bit or 64-bit Java

    Magik on Java runs slightly faster on 64-bit Java when on a 64-bit machine.

  • Which virtual machine is included with a Java installer depends on whether you have:
    • 64-bit JDK: ‘server’ virtual machine only
    • 64-bit JRE: ‘server’ virtual machine only
    • 32-bit JDK: both ‘server’ and ‘client’ virtual machines
    • 32-bit JRE: ‘client’ virtual machine only

We plan to find a way to simplify this in a future version.


Feedback magikonjava.feedback@ge.com

Copyright 1998-2013 General Electric Company. All Rights Reserved. GE and the GE Monogram are trademarks and service marks of General Electric Company.