X
15377

Changing the Java version used with the IDL 8 Workbench

SUMMARY:

Some IDL and ENVI users need to reconfigure their IDL or ENVI installation to use a different version of Java than the one included by default with an IDL or ENVI installation.

This help article provides instructions to do this for IDL 8 installations:

ENVI 5.1/IDL 8.3 NOTES:

a.) ENVI 5.1 and IDL 8.3 (released in December 2013) include JRE version 1.7 as part of the product installation.

b.) ENVI 5.1 and IDL 8.3 for Mac now also use JRE version 1.7, included as part of the product installation. However, because of some legacy installation dependencies, please note this version of ENVI/IDL still requires the additional installation of Java 1.6 on the Mac OS X system, even though these Exelis products will by default use the included Java 1.7.

c.) ENVI 5.1 and IDL 8.3 are only available as 64-bit applications on Linux and Mac. If a custom version of Java is used with these product versions, be sure to use 64-bit Java.

CONTENTS:

    I.) Instructions for changing the Java version used with the IDL 8 Workbench 
         WINDOWS:
             * 
Option A.) Configure the "idlde.ini" file 
             * Option B.) Alter the IDL 8 Workbench shortcut properties 
             * ENVI + IDL (4.8 and later) on Windows 
         LINUX:
             * 
Option A.) Launch "idlde" with the "-vm" command line switch 
             * Option B.) Alter the IDL 8 Workbench shortcut properties 
             * ENVI + IDL and ENVI Classic + IDL 
         MAC OS X (IDL 8.2.3 and earlier) 
   
II.) Verify the JVM version used with IDL

DETAILS:

I.) Instructions for changing the Java version used with the IDL 8 Workbench

WINDOWS

----------------------------------------------------------------------------------------------
Option A.) Configure the "idlde.ini" file
----------------------------------------------------------------------------------------------
To configure IDL to use a different version of Java with IDL Workbench than the one include with the IDL installation, the user can install the desired version of JRE onto their system and then configure the IDL installation's "idlde.ini" (or platform specific equivalent to "idlde.ini") to point to the location of the "jre*/bin" subdirectory of the target JRE installation.

For example, on 64-bit IDL 8.2 on Windows, to make IDL Workbench use an installed Java 7 version of JRE, edit the second line of the file "C:\Program Files\Exelis\IDL82\bin\bin.x86_64\idlde.ini", changing the line:

    C:\Program Files\Exelis\IDL82\bin\bin.x86_64\jre\bin

to:

    C:\Program Files\Java\jre7\bin

NOTES:

* If you are using Windows Vista, Windows 7 or Windows 8, when editing the idlde.ini file, be sure to run a plain text editor program "as Administrator" in order to be able to save changes to the idlde.ini file.

* Also be sure the target Java installation has the same bit-version (32 or 64) as the bit version of IDL being configured. For example, if you use 32-bit IDL on a 64-bit Windows system, you'll need to configure the idlde.ini file located at:

     C:\Program Files\Exelis\IDL82\bin\bin.x86\idlde.ini

----------------------------------------------------------------------------------------------
Option B.) Alter the IDL 8 Workbench shortcut properties
----------------------------------------------------------------------------------------------
If you don't want to or don't have privileges to alter the "idlde.ini" file in the IDL installation, you can alter the Windows shortcut or a copy of the Windows shortcut that launches your IDL Workbench session, in order to force IDL to use a different JVM installation.

To do this, open the Properties dialog on the shortcut icon, and then on the Shortcut tab add to the very end of the Target command field a "-vm" switch and the path to the bin subdirectory of your JVM installation.  For example, the altered target command for 64-bit IDL 8.2 might look like:

    "C:\Program Files\Exelis\IDL82\bin\bin.x86_64\idlde.exe" -vm "C:\Program Files\Java\jre7\bin"

After making this change, click Apply and OK on the Properties dialog to save the change.

Note: As mentioned for Option A, the bit-version (32 or 64) of Java must match the bit-version of IDL being configured.

----------------------------------------------------------------------------------------------
ENVI + IDL (4.8 and later) on Windows
----------------------------------------------------------------------------------------------
* On Windows, "ENVI + IDL" or "ENVI Classic + IDL" sessions (where the IDL Workbench is launched in conjunction with the ENVI interface session) are controlled via separate executable and workbench *.ini, than IDL Workbench session alone.

  To configure "ENVI + IDL" or "ENVI Classic + IDL" to use a different version of Java, you can alter the following *.ini files in the same manner as described in the instructions for Option A above:

    envi_classic_idl.ini
    envi_idl.ini

  These files exist in the same directories as the idlde.ini files mentioned above.

* To alter the Windows shortcut for "ENVI + IDL" or "ENVI Classic + IDL", follow the instructions provided in Option B above, but for the Windows Start menu ENVI+IDL shortcut icons or copies of these shortcuts.

LINUX

----------------------------------------------------------------------------------------------
Option A.) Launch "idlde" with the "-vm" command line switch
----------------------------------------------------------------------------------------------
For individual users, idlde can be launched with the -vm option to specify the desired JVM installation to use with an instance of an IDL Workbench session, for example:

    idlde -vm /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin

----------------------------------------------------------------------------------------------
Option B.) Replace the IDL provided "jre" directory with a symbolic link
----------------------------------------------------------------------------------------------
However to change the JVM version used by all users of a particular IDL 8.x installation, without needing to specify the version of Java used each time "idlde" is started, one could replace the provided "jre" directory tree included with the IDL 8 installation with a symbolic link that points to the equivalent directory of the target JVM version (sudo or root privileges may be needed to make such changes). For example, for 64-bit IDL 8.2.x:

    1.) Delete (or rename) the platform specific "jre" directory from the IDL installation: 

        rm -R /usr/local/exelis/idl82/idlde/bin.linux.x86_64/jre

    2.) Replace the deleted "jre" directory with a symbolic link to the target JVM equivalent directory:

        ln -s /usr/lib/jvm/jre-1.7.0-openjdk.x86_64 /usr/local/exelis/idl82/idlde/bin.linux.x86_64/jre

NOTE: Please note that if you are using 32-bit IDL Workbench on a 64-bit Linux system, be sure create a "jre" symbolic link to a *32-bit specific version of Java* from under the 32-bit Linux platform subdirectory:

    idl82/idlde/bin.linux.x86/jre

64-bit Java is not compatible with a 32-bit IDL Workbench session.  Similarly 32-bit Java will not work with 64-bit a IDL Workbench session.

----------------------------------------------------------------------------------------------
ENVI + IDL and ENVI Classic + IDL
----------------------------------------------------------------------------------------------
Unlike Windows, it is not necessary to configure a Java version for ENVI on Linux separately from that for the IDL Workbench.

MAC OS X (IDL 8.2.3 and earlier)

The IDL 8.2.x for Mac (and earlier) installation does not include a JVM distribution. Instead, the IDL Workbench for this platform relies on the Java 1.6 installation that is configured on the Mac OS X system.  Although Java 1.7 may be separately installed on Mac OS X, the IDL 8.2 Workbench still requires the presence of Java 1.6 on that system in order to operate. 

(As mentioned above in the note at the top of this article, IDL 8.3/ENVI 5.1 include and use Java 1.7 as part of the product installation. However, a legacy Java 1.6 installation on the system must still be available for this version of IDL/ENVI to work properly.)

II.) Verify the JVM version used with IDL

You can verify the version of Java being used by the IDL Workbench session as follows:

1.)  Open Help > About IDL.
2.) Click on Installation Details.
3.) Select the Configuration tab.
4.) In the text window under the Configuration tab, scroll down to find the line beginning with:

    java.runtime.version=...

For example:

    java.runtime.version=1.7.0_25-mockbuild_2013_07_01_09_31-b00

back to top ^ ]

- Reference: IDL-68721 -