Search code examples
javaterminalidl-programming-language

Running IDL routines from Java


I want to run an IDL routine (this, specifically) from some Java code I'm writing. If possible, I'd like to be able to pass arrays and scalars to and from both languages. Is this at all possible?


Solution

  • The IDL Online Help has sections on this ("About The IDL Connector Object" and "Data Manipulation with a Java Connector Object") that should help you to know that yes, you can do this! These are available on the Harris website:

    https://www.harrisgeospatial.com/docs/AboutTheIDLConnectorObject.html
    https://www.harrisgeospatial.com/docs/DataManipulationwithaJavaConnectorObject.html

    If you have access to IDL Online Help, you can find them in these Contents sections:

    Bridges > Java and COM - Connector Objects > About The IDL Connector Object
    Bridges > Java and COM - Connector Objects > Data Manipulation with a Java Connector Object

    I notice that the Java method "getIDLVariable" (which retrieves the named variable from the IDL process associated with the underlying IDL object) has a Note: "This method is disabled for applications running in the IDL Virtual Machine." So, you will need access to a fully licensed copy of IDL to do this.