Solved

java and win16

Posted on 1997-05-23
6
329 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
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…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

863 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

19 Experts available now in Live!

Get 1:1 Help Now