Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Comm. between VC++ & Java

Posted on 1998-07-14
3
Medium Priority
?
163 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

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…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

636 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