aspose file tools*
The moose likes Servlets and the fly likes How to invoke a jar file on the server side. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to invoke a jar file on the server side." Watch "How to invoke a jar file on the server side." New topic
Author

How to invoke a jar file on the server side.

cake naiyou
Greenhorn

Joined: Apr 29, 2011
Posts: 27
I download some open source software, like weka or any other ones, as a jar file. I can run it on linux machine using command line as



At present, I want to learn how to integrate this jar file into an web-based applications. In other words, I want this jar file to be run and wait on a server; I can create a web page, and let user submit the request, like
This request will be transferred to the waiting jar file, and get the result.

I have no previous experience on server programming, so I do not know whether java servlet is the correct tool for fulfill this kind of task? And if you can share any suggestion, hint, or example, that would be wonderful. Thanks.
rinku agarwal
Greenhorn

Joined: Feb 10, 2010
Posts: 6
I think your problem is that you dont know how to use external jar file in a web application. you can just include it in the classpath of the web application or you can check where other jar files in your applications are placed and then you can place it over there. then you can use the classes of the jar file as normal java classes written by you.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to invoke a jar file on the server side.