X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 31 Jan 2012 05:22 PM by  anon
IDL Java Bridge
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
31 Jan 2012 05:22 PM
    Hello All, I've been using Sergey Koposov's, IDL_SQL Java library, to connect IDL 7.1 to a MySQL database and when I tried setting it up on another Windows machine with IDL 8.0 we could not get it to work for a few days. We finally figured out what the problem was and I thought I would throw this out for your information. IDL_SQL uses the IDL Java Bridge and that can be configured with the idljavabrc file in the users home directory. We have Java 7 installed on the machine and we pointed IDL to use that JVM, instead of the JVM that is packaged with IDL, by setting the environmental variable IDLJAVAB_LIB_LOCATION. After many frustrating hours of tweaking environmental variable and setup scripts we were still getting this error: % Compiled module: GET_SQL_CATCH. % GET_SQL: Exception thrown: java.lang.ExceptionInInitializerError We were about to give up when a colleague found this in a file named idljavabrcorig in the IDL80\resource\bridges\import\java folder. It included this paragraph: ################################ # Java virtual machine locations ################################ # # When running the IDL-Java bridge from the IDL Workbench, the # Java Virtual Machine used by the workbench is also used for the # bridge. Values set in this file or by the IDLJAVAB_LIB_LOCATION # environment variable are ignored. # This means that from the Workbench, you can not point IDL to any other JVM, at least from Windows. It works from the IDL command line though. This bug(?) is the not documented any place else in the help files or PDFs. It is buried in this obscure file next to the default idljavabrc file! And, of course, the IDL_SQL library does not work with the prepackaged JVM that IDL 8.0 installs with. So we can not access our database from the IDL Workbench in IDL 8. Doesn't this sound like bug that EXELIS should fix, or at least document in the help pages? Marty PS. Info on the IDL_SQL library can be found here: http://code.google.com/p/idl-sql/wiki/README

    Deleted User



    New Member


    Posts:
    New Member


    --
    01 Feb 2012 11:50 AM
    On windows you can run the workbench (idlde.exe) with the "-outofprocess" flag. That puts IDL in its own process, then you can choose whatever JVM you'd like either through the environment variable or the idljavabrc file. Regards, Scott

    Deleted User



    New Member


    Posts:
    New Member


    --
    07 Feb 2012 06:10 PM
    Scott, We wrote a batch file that contains the line: "E:\Program Files\ITT\IDL\IDL80\bin\bin.x86\idlde.exe" -outofprocess And in our idljavabrc file we have the line: JVM LibLocation = C:\Program Files (x86)\Java\jre6\bin\client But IDL still is trying to use the JVM that comes packaged with it. When we run the bridge_version.pro file, we get a result of: Java version:1.6.0_15 when we should be getting version 1.6.0_30. The IDL_SQL library fails to load in the Workbench but all is fine at the command line. Any other ideas? Thanks, Marty

    Deleted User



    New Member


    Posts:
    New Member


    --
    01 Oct 2012 10:36 AM
    Sorry, I don't know why the -outofprocess flag doesn't work for you. I tested it here and verified it does work to change the java version used by the IDL-Java import bridge. Can you please try the following: - In windows command line cd into the two different java bins and verify the versions there by running .\java -version - Once the versions and there locations are verified, please try adding the -outofprocess flag to the shortcut you use to start IDL from the desktop, then run IDL from there and check BRIDGE_VERSION. It should report the version you have specified in the idljavabrc file. Thanks, Scott
    You are not authorized to post a reply.