i’m working on a quite complex java web application based on Spring framework and hibernate,
i have to create a normal java class (with main method) and export it in a .jar file; this class contains a procedure that will be manually schedulated monthly by an operator.
the results of the scheduling will be consulted on the web app pages (JSP).
i need to use the jar file like this : java -jar myfile.jar arguments ….
is there a way to do this ?
how to export all the dependencies derived from spring and hibernate ?
P.S. i tried export the jar file with MyEclipse but when i try to run the jar, it can’t find spring classes
First of all the title is wrong, you need a standalone application.
Secondly, Every decent java IDE like should provide the option of exporting a jar. For example, in eclipse:
Another option is to use build tools like ant or maven.