?
Solved

Comm. between VC++ & Java

Posted on 1998-07-14
3
Medium Priority
?
164 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 100 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
This video teaches viewers about errors in exception handling.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses
Course of the Month16 days, 23 hours left to enroll

862 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