Article View: borland.public.jbuilder.java.language
Article #17772Re: PLEASE: Can I do this in Java?
From: Brian Burton
Date: Wed, 30 Sep 1998 00:00
Date: Wed, 30 Sep 1998 00:00
70 lines
3272 bytes
3272 bytes
Charlie Vigue wrote:
>
> This is a repost of a message I sent to a different JBuilder group, but
> I think it really belongs here.
>
> I have two projects I am evaluating Java for.
>
> The first is a user interface for an NT device driver. I would need to
> do the equivalent of the Windows API CreateFile, CloseHandle, ReadFile,
> WriteFile and DeviceIOControl family of functions. Is this possible in
> Java? What level of contortion would be required? Would folks on a local
> ethernet connection then be able to use this application from their
> (possibly remote) desktop? Would it be as simple as pointing a Browser
> at my app, or is more involved?
>
> The second project is a port and version upgrade to a MIS interface that
> needs to process data that is available from a DDE server. Same
> questions as above.
>
It sounds to me as though you want to take a platform and language
specific code base and turn it into a component in a distributed system.
That is exactly the sort of problem that CORBA was invented to solve.
There are three basic approaches you could try:
1. use CORBA
2. use a custom socket based protocol
3. use JNI and RMI
Using CORBA you could define a set of distributed objects in C++ that
live on an NT system and make calls to your existing code. These new
objects would be available to clients running anywhere on your network
and written in any language.
Then you could write a GUI interface using Java or C++ that communicates
with the CORBA objects. The GUI could take the form of an application
or an applet. There are several CORBA ORBs available. But they aren't
cheap!
http://www.inprise.com/visibroker
http://www.iona.com
http://www.ooc.com
For more general information on CORBA you can check out the OMG web
site.
http://www.omg.org
A less expensive but more difficult alternative is to develop a socket
based server to accomplish the same thing. Of course with sockets you
have a lot more low level programming to do and have to worry about data
format incompatibilities.
As others have suggested, you could also write a set of native classes
using JNI. Once that's done you could use RMI to create a set of
distributed objects in much the same way as you would with CORBA. But
currently only Java clients would be able to use those objects. In the
future RMI and CORBA will be compatible.
All the best,
++Brian
--
Brian Burton http://www.burton-computer.com
Burton Computer Corporation Custom Java software development
Creators of BC!JNews, the all Java NNTP discussion server.
"Why just spin a web when you could build a community?"
Technical Details
Message-ID:
<36123662.C4A8AA99@burton-computer.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<36097A72.AB41902D@BendNET.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,ad675f8ce07c9ec8 X-Google-Attributes: gidf74b3,public From: Brian Burton <brian@burton-computer.com> Subject: Re: PLEASE: Can I do this in Java? Date: 1998/09/30 Message-ID: <36123662.C4A8AA99@burton-computer.com> X-Deja-AN: 396334776 Content-Transfer-Encoding: 7bit References: <36097A72.AB41902D@BendNET.com> Content-Type: text/plain; charset=us-ascii Organization: Burton Computer Corporation Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language