Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Accessing JAVA code from Smalltalk
I am using VA Smalltalk 6.0.2. A project request I have just received
is to have my application interface with CTI which is a vendor supplied
application that lets you connect your telephone system with your
computer applications. It has a JAVA API but no Smalltalk API.

What I would like to do is write a few JAVA classes as a kind of
wrapper to CTI and then call those classes from my Smalltalk app. The
IBM documentation points me to the PlatformFunction class which really
seems designed to only interface with C or maybe Pascal. I've thought
of writing a C wrapper around the JAVA wrapper and then calling that
from Smalltalk but that is starting to sound a little kludgy and I
don't even know C.

I found a reference mentioned in here to a website that actually does
exactly what I'm asking for:
http://www.metagnostic.org/Dol=ADph...lk/JNIPort.html
BUT it is only good for the Dolphin dialect of Smalltalk. There is no
"contact us" information on the website so I can't get to the author
directly.

My question: does anybody know if JNIPort, or any other tool, will work
with VA to allow JAVA and VA Smalltalk to interact?


Report this thread to moderator Post Follow-up to this message
Old Post
jtzecher
05-10-05 09:00 PM


Re: Accessing JAVA code from Smalltalk
jtzecher wrote:

> What I would like to do is write a few JAVA classes as a kind of
> wrapper to CTI and then call those classes from my Smalltalk app. The
> IBM documentation points me to the PlatformFunction class which really
> seems designed to only interface with C or maybe Pascal. I've thought
> of writing a C wrapper around the JAVA wrapper and then calling that
> from Smalltalk but that is starting to sound a little kludgy and I
> don't even know C.

You might want to load the Server Smalltalk extensions and have a look
at RMI as a possibility.

Tom
-=-=-
... No matter what happens, somebody will find a way to take it too
seriously.

Report this thread to moderator Post Follow-up to this message
Old Post
Thomas Koschate
05-11-05 01:59 AM


Re: Accessing JAVA code from Smalltalk
[x-post to ibm.software.vasmalltalk removed because that ng doesn't exist
on my server]

jtzecher wrote:

> I found a reference mentioned in here to a website that actually does
> exactly what I'm asking for:
> http://www.metagnostic.org/Dol_phin...lk/JNIPort.html
> BUT it is only good for the Dolphin dialect of Smalltalk. There is no
> "contact us" information on the website so I can't get to the author
> directly.
>
> My question: does anybody know if JNIPort, or any other tool, will work
> with VA to allow JAVA and VA Smalltalk to interact?

JNIPort doesn't have a VA port -- at least not that /I/ know of (and I wrote
JNIPort).  Nor -- as far as I know -- is there anything else similar in
concept.

You /could/ port JNIPort to VA, but I wouldn't advise it for your purposes. 
 It
would be a fairly large bit of work (although I'd be happy to help a bit),
almost certainly more than it would be worth just to get access to one
product's API.

Since you don't know C, I wouldn't advise going anywhere near using raw JNI 
to
talk to Java (not trivial, and very very easy to get wrong).  I find it hard
 to
believe that any CTI vendor only has Java APIs available, /surely/ there's a
t
least a C binding too, and possible more (I'd expect to find a COM or Active
X
binding if its a Windows product, for instance).  Still, if Java is the only
available API, then my first impulse would be to separate out the Java logic
into an independent program and communicate with that via TCP/IP.  I don't k
now
anything about the "Server Smalltalk extensions" that Tom mentioned, but if
they allow VA to talk RMI to Java objects, then that might be a relatively
painless way of setting up such a communication path.  I don't suppose it wo
uld
be particularly difficult, though, just to roll-your-own communication
protocol.

-- chris





Report this thread to moderator Post Follow-up to this message
Old Post
Chris Uppal
05-11-05 01:58 PM


Re: Accessing JAVA code from Smalltalk
Hi Chris,

Thanks for the information. I would like to ask you several more
questions about JNIPort including whether you would be interested in
doing a little consulting. Please respond to joel.zecher@ge.com so we
can talk some more offline.

Thanks
Joel


Report this thread to moderator Post Follow-up to this message
Old Post
jtzecher
05-26-05 09:00 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Smalltalk archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 09:51 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.