comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Java and IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Java and IDL [message #39766] Mon, 14 June 2004 11:37 Go to next message
pushyar is currently offline  pushyar
Messages: 9
Registered: October 2002
Junior Member
Hello

I have some questions about integrating Java and IDL. If I wanted
to create a GUI in java and call pre-written IDL code(and methods
too), from the GUI, is the possible? Any help or pointers in the right
direction will be appreciated.

Thanks
Re: Java and IDL [message #39878 is a reply to message #39766] Tue, 15 June 2004 15:51 Go to previous message
p.sommer is currently offline  p.sommer
Messages: 20
Registered: April 2004
Junior Member
We have used Callable and the JNI to create a small native Java object
that wraps IDL's (Callable) Execute String method. The one catch is
that no array data is passed. Strings and scalar args are fine, as
are behavioral keywords, but reorganizing array layouts from Java to
IDL is not easily handled in a general sense and went far beyond what
I needed at the time.

This Callable/JNI wrapper was built for a prospect who simply needed
to call an IDL .sav file that took a string for an arg (filename).
IDL did some processing and then wrote the result out to 'filename' on
disk (NOTE:No array data passing and will not run under IDL's Virtual
Machine).

Remember too that ION (IDL On the Net) would work for you (and you can
pass data as well as display IDL graphics in a native Java Canvas).
It's based on a client/server model which is primarily used for web
enabled apps, but you can also use this tech for desktop, JFrame apps.
Contact your RSI Sales Rep for more info if you want to evaluate ION.
In the meantime, I will try and get the Callable/JNI example out on
our IDL User Contrib site by weeks end. Stay tuned...

-Paul

Michael Wallace <mwallace.no.spam@no.spam.swri.edu.invalid> wrote in message news:<10cu2mkq0bmk14d@corp.supernews.com>...
> Actually, an easier route is to go to Chapter 8 of the External
> Development Guide and read up on Java-IDL integration. There is an
> example of a program which uses Java for the GUI and IDL for the
> processing underneath. The only gotcha is that the main program needs
> to be written in IDL and Java is called from IDL.
>
> Use Callable IDL only if you really need to call IDL from Java. Keep in
> mind that this is a much more difficult route since there is no direct
> way to use callable IDL in Java. You'd need handle the callable IDL in
> C and then create JNI mappings from Java to the C library just created.
> Neither Callable IDL or JNI are that easy to work with if you've never
> touched them before.
>
> -Mike
>
> Haje Korth wrote:
>> You should look at the IDL External Development Guide under sction "Callable
>> IDL".
>>
>> Cheers,
>> Haje
>>
>>
>> "Pushya" <pushyar@yahoo.com> wrote in message
>> news:39e6dba3.0406141037.4667df67@posting.google.com...
>>
>>> Hello
>>>
>>> I have some questions about integrating Java and IDL. If I wanted
>>> to create a GUI in java and call pre-written IDL code(and methods
>>> too), from the GUI, is the possible? Any help or pointers in the right
>>> direction will be appreciated.
>>>
>>> Thanks
Re: Java and IDL [message #39894 is a reply to message #39766] Tue, 15 June 2004 07:42 Go to previous message
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
Actually, an easier route is to go to Chapter 8 of the External
Development Guide and read up on Java-IDL integration. There is an
example of a program which uses Java for the GUI and IDL for the
processing underneath. The only gotcha is that the main program needs
to be written in IDL and Java is called from IDL.

Use Callable IDL only if you really need to call IDL from Java. Keep in
mind that this is a much more difficult route since there is no direct
way to use callable IDL in Java. You'd need handle the callable IDL in
C and then create JNI mappings from Java to the C library just created.
Neither Callable IDL or JNI are that easy to work with if you've never
touched them before.

-Mike

Haje Korth wrote:
> You should look at the IDL External Development Guide under sction "Callable
> IDL".
>
> Cheers,
> Haje
>
>
> "Pushya" <pushyar@yahoo.com> wrote in message
> news:39e6dba3.0406141037.4667df67@posting.google.com...
>
>> Hello
>>
>> I have some questions about integrating Java and IDL. If I wanted
>> to create a GUI in java and call pre-written IDL code(and methods
>> too), from the GUI, is the possible? Any help or pointers in the right
>> direction will be appreciated.
>>
>> Thanks
Re: Java and IDL [message #39897 is a reply to message #39766] Tue, 15 June 2004 04:52 Go to previous message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
You should look at the IDL External Development Guide under sction "Callable
IDL".

Cheers,
Haje


"Pushya" <pushyar@yahoo.com> wrote in message
news:39e6dba3.0406141037.4667df67@posting.google.com...
> Hello
>
> I have some questions about integrating Java and IDL. If I wanted
> to create a GUI in java and call pre-written IDL code(and methods
> too), from the GUI, is the possible? Any help or pointers in the right
> direction will be appreciated.
>
> Thanks
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: QROMB and parameters
Next Topic: bug in polyfiilv

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 14:13:12 PDT 2025

Total time taken to generate the page: 1.20146 seconds