File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to call a local class from a servlet?

 
Raj S Kumar
Ranch Hand
Posts: 48
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64182
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Include the jar as part of the web app by placing it in WEB-INF/lib.
 
Mayuresh H. Trivedi
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
vijin das
Ranch Hand
Posts: 129
Firefox Browser Java Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Explain like whether you would like to run this jar as a separate process which will be running on the local machine ??....
 
arriesh chellu
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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....
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic