Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Servlets and the fly likes How to call a local class from a servlet? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to call a local class from a servlet?" Watch "How to call a local class from a servlet?" New topic
Author

How to call a local class from a servlet?

Raj S Kumar
Ranch Hand

Joined: Aug 06, 2006
Posts: 48
Hi,
I have a Jar file(an application) which works with some other third party applications(exe files) in the machine.
Now, I have to call the Jar file from a web application, which in turn should work with the Third party applications.

How this could be solved?

Please Help me on this.

Thanks in Advance


Raj S Kumar
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61095
    
  66

Include the jar as part of the web app by placing it in WEB-INF/lib.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Mayuresh H. Trivedi
Greenhorn

Joined: Jan 16, 2008
Posts: 5
Hi,

you might required to put your jar and exe file (if it requires ) in lib folder.

then you may reference it in your application.

hope it works.

let me know if you want any thing else.


Thanks & Regards,
MAYURESH
vijin das
Ranch Hand

Joined: Jun 07, 2010
Posts: 129

Explain like whether you would like to run this jar as a separate process which will be running on the local machine ??....


VIJINDAS
arriesh chellu
Greenhorn

Joined: Jan 18, 2010
Posts: 7
C as said by the professionals above just place the jar file in the "lib" folder of your application and then restart the server and then run your application
the jar file which you have placed will automatically be referenced by the application...

and regarding the exe files where ever you are using the exe just give the path of that exe and mind it you placce the exe in the same path as given in the code of your library class....
 
 
subject: How to call a local class from a servlet?