Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I run .jar file on Tomcat?

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

like image 569
Luben Avatar asked Jan 03 '11 20:01

Luben


1 Answers

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.

like image 69
miku Avatar answered Sep 30 '22 15:09

miku