![]() if you are building your project using ANT build.xml than you can use jar task to create JAR file and if you are using MAVEN to build your project you can use Maven JAR plugin for creating JAR. I suggest using Ecipse or Netbeans for creating JAR file. Though I understand having good knowledge of JAR command can help you lot while debugging or playing in JAVA environment and these examples of JAR command is very helpful.Ĭreating JAR file in Java is much easier in IDE than command line. ![]() I rarely use JAR command to create JAR file most of the time JAR is created using ANT build script or maven JAR plug-in. Main-Class attribute in JAR's manifest file. Its a relatively new option and used to specify entry point i.e. ![]() ![]() In this article, we will some JAR command examples and learn how to create and execute jar files, how to view contents of a jar file from command prompt and Eclipse and Netbeans. Windows 7, Windows 8, Macintosh, or Linux.Īpart from platform independence and standard delivery method jar file also provides compression of contents which results in faster download if you are downloading java program from the internet especially in case of mobile devices where you install Java program by OTA. you can execute the same jar file in any operating system e.g. JAR stands for Java Archive and provides a platform-independent deliverable for java programs, libraries and frameworks. JAR file in Java is a kind of zip file that holds all contents of a Java application including Class files, resources such as images, sound files, and optional Manifest files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |