Solved

Comm. between VC++ & Java

Posted on 1998-07-14
3
156 Views
Last Modified: 2010-03-30
Platform : Windows NT 5.0
Language : VC++ 5.0, JDK1.1.6

I want to make a server with JKD1.1.6 and clients with VC++5.0.
Which data types do I have to use for socket comunication between VC++5.0 and JDK1.1.6?

There is no problem on each side.
I tested server  with JKD1.1.6 test client. And client with VC++5.0 test server.

Any idea?
If you have any sample code, please send it with your response.
Thanks in advance.
0
Comment
Question by:lmh99
3 Comments
 
LVL 5

Expert Comment

by:msmolyak
ID: 1226141
Any chance you can use CORBA for your project. There the conversion between language data formats will be handled by the ORB all you will need to do is to write interfaces using C++ and JAVA IDLs.
0
 

Author Comment

by:lmh99
ID: 1226142
Hi, msmolyak!

But this time, I don't want to use CORBA.
I want to make it with pure java and VC++.

I'll wait your kindly response again.
Thanks again.
0
 

Accepted Solution

by:
sulam earned 50 total points
ID: 1226143
If you can't use higher-level network protocols like RPC, RMI or CORBA, you are limited to what TCP and UDP.

On the Windows side this means using winsock or another sockets library (such as the Cygnus Win32 Gnu libraries). On the Java side TCP and UDP are both supported in the java.net packet of course.

Once you're on this path, the data types are simply bytes. However these bytes can be cast into other native types on the C++ side, or produced via one of the factory methods on the Java side. While this is straightforward it's certainly low-level. You have to deal with marshalling your arguments for method calls by hand. None of it is difficult per se, but it is tedious.

A good reference on this topic is Stevens book called _Unix Network Programming_. When it was written sockets was not yet the standard on Windows that it is today, and so while the title refers to Unix it is generally applicable to all TCP/IP programming.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
word0 challenge 4 52
HashMap Vs TreeMap 12 48
Problem to start Neon 20 51
how do i compare an object based on two fields 6 28
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now