An IDL Virtual Machine is a runtime version of IDL that can execute IDL .sav files without an IDL license. It is designed to provide IDL users with a simple, no-cost method for distributing IDL applications. It runs on all IDL-supported platforms, and does not require a license to run. This utility allows you to easily distribute IDL SAVE files to your colleagues or your customers, without requiring them to own an IDL runtime license.

The IDL Virtual Machine is included with all IDL distributions. For the benefit of developers who need to debug applications designed to run in this environment, the IDL Virtual Machine can be started explicitly. Otherwise, if a SAVE file program is run without an IDL license, IDL defaults to the IDL Virtual Machine mode.

If you have received an IDL Virtual Machine application from someone else and are interested in running it on your own computer, do the following:

  1. Install IDL. If the application you received does not include a runtime IDL distribution or installer, you can use the IDL installer that came with your distribution. You do not need an IDL license to run Virtual Machine applications.
  2. Install the Application. Follow the application developer’s instructions to install the Virtual Machine application on your computer.
  3. Run the Application. Follow the application developer’s instructions to start the application, or see below.

Steps to Create and Distribute Your Application


To create and distribute an IDL Virtual Machine Application, do the following:

  1. Create your application using an IDL development license, observing the limits described below in Limitations. Test the application in the IDL Virtual Machine.
  2. Create one or more SAVE files containing your application.
  3. Provide your users with instructions for installing an unlicensed copy of IDL, or create a runtime application distribution using MAKE_RT.
  4. Provide your users with instructions for installing your IDL application.
  5. Provide your users with instructions for running your IDL application in the IDL Virtual Machine (see the next section).

Also see Preferences for Virtual Machine Applications below.

Starting a Virtual Machine Application


Installations of IDL that have access to a development license can create compiled binary versions of IDL applications; these compiled versions are stored in files with the extension .sav. Many applications stored in .sav files can be executed by the IDL Virtual Machine.

If you use the MAKE_RT procedure to create a runtime distribution, specifying a SAVE file for your application, application launch scripts for your application are created automatically. (You may need to modify the launch scripts.) If you do not use MAKE_RT, you can still create application launch scripts based on generic scripts included in the IDL distribution.

Alternately, you can provide instructions for your users detailing how to run a .sav file in the IDL Virtual Machine. The process depends on your operating system:

Windows


Windows users have several options to start a Virtual Machine application:

To run an application stored in a .sav file:

  1. Double-click on the .sav file icon in the Windows Explorer. If a development license is present, the application will run in a licensed copy of IDL. If no license is present, the IDL Virtual Machine window will open.
  2. Click anywhere in the window to run the application in the IDL Virtual Machine.

To open a .sav file from within the IDL Virtual Machine:

  1. Launch the IDL Virtual Machine and display the IDL Virtual Machine window by selecting Start > Programs > IDL x.x > IDL Virtual Machine.
  2. Click anywhere in the IDL Virtual Machine window to close the window and display the file selection menu.
  3. Locate and select the .sav file, and double-click or click Open to run it.

To run a .sav file from the command line prompt:

  1. Select Run from the Start menu, and enter cmd.
  2. Change directory (cd) to the IDL_DIR\bin\bin.platform directory.
  3. Enter the following at the command line prompt:
    idlrt -vm=<path><filename>

    where <path> is the path to the .sav file, and <filename> is the name of the .sav file.

UNIX


UNIX users must launch the IDL Virtual Machine from the UNIX command line.

To run a .sav file in the IDL Virtual Machine:

  1. Enter the following at the UNIX command line:
  2. idl -vm=<path><filename>

    where <path> is the complete path to the .sav file and <filename> is the name of the .sav file. The IDL Virtual Machine window is displayed.

  3. Click anywhere in the IDL Virtual Machine window to close the window and run the .sav file.

To launch the IDL Virtual Machine and use the file selection menu to locate the .sav file to run:

  1. Enter the following at the UNIX command line:
  2. idl -vm

    The IDL Virtual Machine window is displayed.

  3. Click anywhere in the IDL Virtual Machine window to close the window and display the file selection menu.
  4. Locate and select the .sav file and click OK.

Mac


Mac users have several options to start a Virtual Machine application:

To open a .sav file from the IDL Virtual Machine:

  1. Double-click the IDL x.x Virtual Machine icon to display the IDL Virtual Machine window.
  2. Click anywhere in the IDL Virtual Machine window to close the window and display the file selection menu.
  3. Locate and select the .sav file and click OK.

To run the IDL Virtual Machine from the UNIX command line, see the UNIX steps.

Preferences for Virtual Machine Applications


IDL’s preference system allows developers, administrators, and individual users to control default values for many aspects of IDL’s environment and configuration. Creators of runtime applications can take advantage of the preference system to customize the environment in which a particular application runs.

See Preferences for Runtime Applications for a discussion of using preferences in the context of any IDL runtime application, including applications that run in the IDL Virtual Machine.

The process of specifying preferences for a Virtual Machine application is complicated by the following facts:

  • Since you are relying on a standard IDL Virtual Machine distribution rather than a distribution you create, it is more difficult to install a preferences file in the application distribution.
  • On Microsoft Windows and Mac platforms, users may launch your Virtual Machine application by clicking on the SAVE file icon, or by dragging the SAVE file icon onto the Virtual Machine icon. This prevents you from specifying preferences via a command line option.

Options for Windows Applications


If your Virtual Machine application runs under Microsoft Windows, you have the following options:

  • Have your users launch the Virtual Machine application via the Windows command line, and use the -pref command line option to specify a preferences file or to specify individual preferences.
  • Have your users install an idl.pref file in the IDL_DIR/bin/bin.platform directory where platform is the platform-specific bin directory, and then launch the application by clicking on the SAVE file icon or by dragging it to the Virtual Machine icon.
  • Instruct your users to set environment variables that correspond to the preferences you need to specify.
  • If you are providing a runtime distribution for your application, you can install an idl.pref file in the IDL_DIR/bin/bin.platform directory yourself.

Options for UNIX/Mac Applications


If your Virtual Machine application runs under UNIX (including macOS), you have the following options:

  • Have your users launch the Virtual Machine application via the shell command line, and use the -pref command line option to specify a preferences file or to specify individual preferences.
  • Instruct your users to set environment variables that correspond to the preferences you need to specify.

Limitations of Virtual Machine Applications


The IDL Virtual Machine will run a compiled IDL SAVE file even if no IDL license is present. The purpose of the IDL Virtual Machine is to facilitate IDL code collaboration and application distribution.

In addition to the limitations of runtime applications in general, applications that run in the IDL Virtual Machine have the following restrictions:

  • The IDL Virtual Machine displays a splash screen on startup.
  • SAVE files must be created using IDL version 6.0 or later.
  • No access to the IDL command line or IDL compiler is provided.
  • Startup files are not executed.
  • The use of the IDL EXECUTE function is disabled. (In most cases, calls to the EXECUTE function can be replaced with calls to the CALL_FUNCTION and CALL_PROCEDURE routines.)
  • The Execute, GetVar, and SetVar methods to the IDL_IDLBridge object are disabled.
  • The COM and Java IDL Export Bridge connector objects are disabled.
  • Callable IDL applications will not run in the IDL Virtual Machine.