aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes Use a .dll file. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Use a .dll file." Watch "Use a .dll file." New topic
Author

Use a .dll file.

sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 823

Hi, is there a way through which i can access the .dll file of the system through my servlet? I want my servlet to use one of the .dll file in the windows C dir. Is this possible?
Please help.


Regards, Sud.
SCJP 5 ScjpFAQ JLS
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42289
    
  64
You'd need to use JNI to access any DLLs. There are libraries that remove some of the pain of doing that, like Jacob and Jawin.


Ping & DNS - my free Android networking tools app
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 823

Do i have to learn MFC for that?

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42289
    
  64
Did you check out how those libraries work?
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 823

yes i did.
I want a windows pop-up which will require mfc coding.
the thing is i am tryn to control a hardware connected to my machine which requires the system .dll file.
And as far as i think now is that i dont have to go with MFC now as that depends on the application that i create.
What do you say?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42289
    
  64
Well, it's hard to say what a machine we don't know anything about might or might not require. What does its documentation say?
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 823

I want to do this through a servlet.
I wont be using any of the windows component,then is MFC required?
[ November 01, 2008: Message edited by: Sudipto Shekhar ]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42289
    
  64
Originally posted by Ulf Dittmer:
What does its documentation say?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18669
    
    8

A Windows pop-up? MFC? Those sound like display technologies to me. If you want to use them in a servlet, then they would be displaying something on your server. Was that what you wanted to do?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19722
    
  20

Correct. If you want to display a message to the client, use JavaScript. Or an applet if you prefer that, but then you're not using server-side code anymore. So JavaScript it is


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 823

No, this is not what i intend to do.
When the client requests for the servlet,the servlet invokes a call to the .dll file which is of a device driver,say of a bluetooth device and says it to switch it on! And in this process when ever a .dll file is accessed i want the the system to pop-up a window to ask for the permission to do so... so that is what it meant to be!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61434
    
  67

Where do you want the popup to appear? On the client or the server?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 823

on the server....as the whole thing is in an experimental stage.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42289
    
  64
What good does a popup that is shown on the server - who's going to see that? I think a more detailed problem description would help.
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 823

i said my work is in an experimental stage..hence it makes it makes no difference if i show it on the client side or the server side.i want a pop-up....on the server,for now. And for the detailed description i had said what i want to do.

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42289
    
  64
Sticking the tongue out to people who are trying to help you isn't very nice, is it?

Without further details I'm afraid I can't contribute anything else.
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 823

Well dear its not like that.
you interpreted what was not at all intended,you know!
Thanks any ways.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Use a .dll file.