Alex Rivera | Logout

Can I run .jar file on Tomcat?

Asked 2011-01-03T20:57:21.057
13

a very noob question. Can I run a .jar file on Tomcat. I am not building a web-app. I simply need to run a .jar with say HalloWorld in it. Is this possible/appropriate.

Thanks

Edit
Report

1 Answer

8

You can run a Java archive without Tomcat, simply with a Java Runtime Environment:

$ java -jar myhelloworldapp.jar

Tomcat is a servlet container, only needed for web applications.

answered 2011-01-03T21:00:26.050

Your Answer