Re: Calling a DLL from a Java Applet
From: Rowland (banksr0_at_hotmail.com)
Date: 08/31/04
- Next message: Edwin Martin: "Re: SE 1.4.1_02 and Windows..."
- Previous message: Edwin Martin: "Re: Java vs Perl for specific tasks"
- In reply to: Raymond DeCampo: "Re: Calling a DLL from a Java Applet"
- Next in thread: Rowland: "Re: Calling a DLL from a Java Applet"
- Reply: Rowland: "Re: Calling a DLL from a Java Applet"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Next message: Edwin Martin: "Re: SE 1.4.1_02 and Windows..."
- Previous message: Edwin Martin: "Re: Java vs Perl for specific tasks"
- In reply to: Raymond DeCampo: "Re: Calling a DLL from a Java Applet"
- Next in thread: Rowland: "Re: Calling a DLL from a Java Applet"
- Reply: Rowland: "Re: Calling a DLL from a Java Applet"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|