Re: Calling a DLL from a Java Applet

From: Rowland (banksr0_at_hotmail.com)
Date: 08/31/04


Date: Tue, 31 Aug 2004 10:12:28 +0000 (UTC)


"Raymond DeCampo" <rdecampo@spam.twcny.spam.rr.spam.com.spam> wrote in
message news:NWPXc.48340$Kt5.16083@twister.nyroc.rr.com...
> Rowland wrote:
> > Hi,
> >
> > I know this question has prob. been asked a million times, but I
couldn't
> > find it in the FAQ, so here goes :
> >
> > I'm trying to write a Java applet to call a dll that resides on the web
> > server (running IIS 6). I've written a little test applet that should
call a
> > helloWorld function in the dll, but when I use System.loadLibrary, it
gives
> > me this security warning :
> >
> > java.security.AccessControlException : access denied
> > (java.lang.RuntimePermission loadLibrary.myLib)
> >
> > I've read that it's not possible to run a dll on a client computer
(except
> > perhaps by signing it?), but I can't find much information about dll's
on a
> > web server. If anyone could give me any pointers, I'd really appreciate
it
> > :-)
> >
>
> The applet runs on the client. If the applet spawns code, be it from a
> jar, a dll or whatever, the code runs on the client. Therefore it would
> be a security issue to allow the applet to execute code from a dll no
> matter where the dll came from.
>
> Now, did you want the dll code to be executed on the client or the
> server? If you want the client, you'll have to sign the applet and I
> would expect things to get messy. If you want the code to execute on
> the server, then you need to write some sort of server program (servlet,
> web service, simple socket-based server, etc.) to execute the code.
> Then make the applet a client of that server.
>
> Ray
>
> --
> XML is the programmer's duct tape.

Thanks very much for you response - I'll explain the problem and you might
be able to guide me in the right direction :-).

Basically, I'm writing an administration program for a database. I've
already written the program in VB, but our client wants to convert it so
that it will be deployed from their web-server. For this reason it was
decided to investigate Java. However, to save time (and for other reasoons),
I was hoping to be able to use an existing DLL within the Java program. I've
done this with a Java application before, but I've very little experience
with applets, servlets, etc. The dll will be executing code to talk to a
database, so it would prob. be best to have it server side for security.

So my question is this : What would be the best way to solve this problem.
Can I have a client applet written using the AWT talking to a server servlet
using my dll? Are there other, better options?

Many thanks,

Rowland.



Relevant Pages

  • Re: screen scrape / remote manipulation
    ... Functionally a dll is no different from an .exe in terms of spying ... The other option is to install software capable of monitoring TCP/IP port ... connection is established between the dll (on the client) and the server, ...
    (microsoft.public.windowsxp.general)
  • Re: Calling a DLL from a Java Applet
    ... > helloWorld function in the dll, but when I use System.loadLibrary, it gives ... > web server. ... The applet runs on the client. ...
    (comp.lang.java)
  • RE: how to share a static variable between 2 different process
    ... dll into Component Services in Windows as a COM+ server. ... my dll has been exposed as a COM object thanks ... course one client could pay only seats who reserved itself. ... disk) of the reservations and the related process who made the reservations. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: VB6 Winsock action on Server
    ... file the dll must access. ... No one client request is related to any other. ... server could not possibly utilize the capabilities of the additional ...
    (microsoft.public.vb.general.discussion)
  • Re: screen scrape / remote manipulation
    ... is what is contained within the dll. ... connection is established between the dll (on the client) and the server, ... One workaround is to install ...
    (microsoft.public.windowsxp.general)