Solved

java and win16

Posted on 1997-05-23
6
324 Views
Last Modified: 2012-08-13
How can java and win16 communicate with each other?
0
Comment
Question by:Balaji052397
  • 3
  • 3
6 Comments
 
LVL 6

Accepted Solution

by:
jpk041897 earned 200 total points
ID: 1220773
There are two approaches you can take to establish communication between a Java Applet or Server and an App running on Win16:

The first and simplest is to use a 16 bit winsock on Win16 (like Trumpet or Netsoft Chameleon)  and establish socket communication (either TCP or UDP) . Once the socket is established communication is straightforward.

Tere are a few limitations though:

- Win16  boxes can act as clients or servers, but are unable to function as both simultaneously. I.e.: You can run a clent application OR a server application on the box at any given time, but not both.

- Win16 based comertial languages do not include Winsock libraries, you would have to purchase one. I know Netsoft has one and I belive there might be a couple of sharware libs. arround.

- Socket programming under Win16 uses the WInsock 1.0 specs. WIn32 apps use 1.1 or above.

- Socket programing, although not very dificult, does require a lot of work.

The second approach is to use RPC's on the Win16 side and CORBA on the Java side. This solution shares all the limitations specified for winsock, with one exception. RPC  programming requires you to define an NIDL file (Network Interface Definition Language) to create the stubs that the app is going to use to establich communication. Once you have that working the rest is trivial.

Which option you chose depends on what you want to do. Use sockets for file and data transfer and RPC's for Remote Method Invocation.

Notes:

Java RMI is still in the alfa stage, although eisyer to use than CORBA, it is still unstable enough to warrant avoiding it for serious development efforts.

Although I believe I read somwhere that efforts were being made to provide a 16 bit version of Java, such versions are reputet not to support the java.net.* package.


I believe this adresses the main part of your question, but fel fre to add comments requesting further details if you need them.


0
 

Author Comment

by:Balaji052397
ID: 1220774
thanks for answering my question ,could u suggest a good book
for reading about these RPC's RMI's etc.
0
 
LVL 6

Expert Comment

by:jpk041897
ID: 1220775
I learned RPC using UNIX about  5 years ago so most of the books I used to leran RPC programming are out of print now. :-)

One of the best one is still arround thouh, its called:

Power Programming with RPC.

By John Bloomer
1st Edition February 1992
0-937175-77-3, Order Number: 773
522 pages, $29.95

You can get it dirrectly from  O'rielley at:

http://www.ora.com

or from Amazon (probably cheaper) at:

http://www.amazon.com

Regarding RMI and Corba, sice I allready knew RPC, I learned what I needed from the DOCS and scattered articles on the Net.

You can run a search for titles on Amazon or you could post a 10 point question for books that are a lot more up to date than my collection is.
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:Balaji052397
ID: 1220776
could u give me a hardcoded Rpc sample sever and client
application where
client asks for the time
Server gives the current time
0
 
LVL 6

Expert Comment

by:jpk041897
ID: 1220777
Not as simple as taht I'm afraid. RPC's use a language called IDL (Interface definition Language) that generate stub code.

Stubs are combinations of header files and code files that are added to an application so that it (the application) can call the RPC libraries.

Send me an e-mail to:

jkelleghan@usa.net

and I'll gladdly send you some samples over e-mail, Even the smallest uses to many files to be conviniently posted here.

Regarding additional referances; Do you have access to the MS network CD or the Visual C++ standard (or better) edditions?

They contain all the info and samples you could ever need for RPC programming.
0
 

Author Comment

by:Balaji052397
ID: 1220778
Thank u for the suggestions , i have got vc++ 5.0 CD ,I will
search for RPC in that ,I also have got MSDN CD,Will search thro
that too.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
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…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

758 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

21 Experts available now in Live!

Get 1:1 Help Now