Tag Archives: jar

how to create jar from classes

This tutorial i show you how to create jar file from classes folder. To begin with this guide, i have some assumption

  • Your OS is Windows
  • Your classes folder: E:\classes
  • Your OS Environment JAVA_HOME variable already set and $JAVA_HOME\bin already in $PATH

Step1: open command line tool, move to directory E\classes

Step2: Using follow command to create your jar file

jar -cf file_name_jar.jar *

In my case now it will be:

jar -cf cyclos.jar *

Create jar file for deploy has many benefit. In web we can just copy jar file if want to change some minor code without deploy or copy all libs so can make decrease the down time of your application.