Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

java and win16

Posted on 1997-05-23
6
Medium Priority
?
338 Views
Last Modified: 2012-08-13
How can java and win16 communicate with each other?
0
Comment
Question by:Balaji052397
[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
  • 3
6 Comments
 
LVL 6

Accepted Solution

by:
jpk041897 earned 400 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

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

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
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:
Suggested Courses

721 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