connecting to other Apps

I am trying to connect to an application called Attachmate Extra!.

I have created this connection using VBA, but i would start using Jave instead.

here is the block of code in VBA

Private Sub objGetExtra()

Set System = CreateObject("EXTRA.System")

Set Sessions = System.Sessions

Set Sess0 = System.ActiveSession

End Sub 'end of objGetExtra sub function

then to send instruction to the application using this connection, i use this

Sess0.Screen.SendKeys ("<Tab>")

I have created a connection to an access database using java. Would the connection to another application be similar?

Thanks in advance

[680 byte] By [OXGoodfellaa] at [2007-10-2 12:18:29]
# 1

This is way too less information. The first part seems to be another Windows application. So you need some 3rd party Libs to access the COM interface (e.g. JACOB). Or does this other app has a socket interface?

A connection to a databse is probably done with JDBC in java, right? This is specific to RDBMs and has nothing to do with an application. You really need to state your exact requirements an interfaces first.

MartinHilperta at 2007-7-13 9:06:06 > top of Java-index,Java Essentials,New To Java...
# 2

> I am trying to connect to an application called

> Attachmate Extra!.

>

> I have created this connection using VBA, but i would

> start using Jave instead.

>

> here is the block of code in VBA

>

> Private Sub objGetExtra()

>Set System = CreateObject("EXTRA.System")

>Set Sessions = System.Sessions

>Set Sess0 = System.ActiveSession

> End Sub 'end of objGetExtra sub function

>

> then to send instruction to the application using

> this connection, i use this

>

> Sess0.Screen.SendKeys ("<Tab>")

>

> I have created a connection to an access database

> using java. Would the connection to another

> application be similar?

>

> Thanks in advance

The code you show uses the ability of Extra! to expose its functionality

as an ActiveX server (or OLE automation server), just like Word or Excel

do. VB, C++, C# (Microsoft stuff) can quite easily access ActiveX

objects. Java can also do it, but it's not that easy. In your place, I would

investigate:

1. Does Extra! offer a Java interface?

2. Maybe another terminal emulation does.

3. Various ways to connect from Java to ActiveX. Check the Sun ActiveX bridge. I know it exists, but not more than that. Google for other solutions.

4. If none does the trick, study JNI, which allows Java programs to call native stuff (like a DLL). JNI has nothing specific for ActiveX, but It can be used to call Windows and Attachmate native API's.

baftosa at 2007-7-13 9:06:06 > top of Java-index,Java Essentials,New To Java...
# 3

I tried to find out if Extra! has Java support - but no luck there

however there is another terminal emulation i can use. (please bear with my terminology if it not 100% accurate) Its called the IBM WebSphere Host On Demand. This opens in a browser and then it opens up another window that has the session. As its trying to open up the session, the Java sunburst loading come up. So i believe it is using Java.

Would it be easier to use this rather that Extra! if i stay with Java? Or should I use VB and go with Extra!

I am sorry if i dont make sense, but i am fairly new to developing and would appreciate any help

OXGoodfellaa at 2007-7-13 9:06:06 > top of Java-index,Java Essentials,New To Java...