[3212] in java-interest

home help back first fref pref prev next nref lref last post

Native Methods in Applets ? Java IPC ?

daemon@ATHENA.MIT.EDU (Kondratiev Dima)
Fri Nov 3 11:42:34 1995

From: Kondratiev Dima <DIMA@edge.paragraph.com>
To: Java Interest <java-interest@java.sun.com>
Date: Fri, 03 Nov 95 16:56:00 R



I am writing an applet which uses native method to get DIB data
from some DLL and display it in HotJava window under NT. This applet is
supposed to be some kind of terminal window to 3D scene provided
by some external existing software, which wouldn't be rewritten in near
future in Java.
 Applet should also be able to translate user mouse/keyboard input to this 
software, implemented as DLL under NT.
First I wrote some vanila class with native method and tested it
in Java interpreter  Alpha 3. Native method works in this case as it should,
though a lot of standard header files to compile DLL are missing,
as well as some types.

When I tried to run native method from an applet, I've got "DLL IOException 
permission error".

I looked through Sun Java mailing archive and found this to be a common
problem. I found the following explanation :

>Re: DLL IOException permission error
>
>Jim Graham (flar@bendenweyr)
>Tue, 18 Apr 1995 13:28:18 -0700
....
>
>Hi Scott,
....
>
>The native method to link in a shared library will generate an IOException
>if the request came from an Applet. This is done primarily for security
>reasons.
>
>Also note that one of the main uses of Applets is to be downloaded over
>the net into a browser running on an arbitrary architecture. Since
>loading a shared library is an inherently architecture dependent action
>(not to mention very un-secure) Applets should not rely on doing that.
>

In other words applet classes cant use native methods ? If this is true
it must be clearly stated in documentation, I think.

In this case my question is : Does Beta release provide
any local IPC except Sockets and basic I/O streams, that make possible fast 
communication with external processes running on the same machine where 
applet is running? Some sort of interproccess communication at all ?
To what extant Java IPC will be compatible with local system IPC,
such as Named Pipes under NT, for example ?

Thanks for your help.

Dima.
 -----------------
dima@paragraph.com
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post