Link to home
Start Free TrialLog in
Avatar of David_A_Tran
David_A_Tran

asked on

Visual Basic and Java

Hi,

Does anyone know of a easy way to pass data between a Java and Visual Basic application.  I hava a client with a Visual Basic application that need to connected to my Java program to receive and send data.   The data is then processed and pass on to a server application which is also Java.  I was thinking of passing it as a "STRING", but it would require a parser on both end, also need to implement handshake in case the STRING is not completed.

Any help is greatly appreciated.

Thanks,
David
Avatar of gillgates
gillgates

You could write the information to a database and you wouldn't need a parser because the data members would have their own fields.
You could pass the data as a command line argument to the VB program and execute it from within JAva using the System.Runtime classes.
Avatar of David_A_Tran

ASKER

Let me explain what I have and plan to do a little bit more in detail.  We have a applicaiton server written in Java that interface with the hardware.  This application server will send command to our "devices" and receive data from the devices.  We have application client (GUI) which is connected to our application server to send and receive these data via a java gui.  Now, we have a test group that have applicaiton written in VB that also need to integrate to our application server (written in Java) via a socket connection.  I wonder if there is a VB plug in that will allow me to pass Java Object Stream over.  I thought of using database, XML parser and String.  
1.  database require synching of the real time command.
2.  XML parser is a little too much work.
3.  String is one last option, but it would require a smart parser.
 
Any ideal.  I am not familiar with VB.
A simple way would be to expose the relevant servies from your Java server via webservices and then call the webservices from VB.
I am new to programming but what about writing and reading data to a text file, I guess it depends on how much data you are parsing.

If it is a lot then a database would be a good idea !!
David

Did any of our solutions work?  If so accept an answer.  If not let us know more about your problem so we can help you.
Hello,
use two TCP sockets one in the java app, the other on the vb app and send data between  them in the format you want.

Jose
None of the suggesting work for me, but I found the tool out there that does the trick.  It's called JNBridge.  Thanks for all your responds.
ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial