posts - 28, comments - 37, trackbacks - 0, articles - 0

          簡單的jar使用方法

          Posted on 2011-07-01 11:18 俞靈 閱讀(762) 評論(0)  編輯  收藏
          簡單的jar使用方法
          JAR files are packaged with the ZIP file format, so you can use them for "ZIP-like" tasks such as lossless data compression, archiving, decompression, and archive unpacking. These are among the most common uses of JAR files, and you can realize many JAR file benefits using only these basic features.

          Even if you want to take advantage of advanced functionality provided by the JAR file format such as electronic signing, you'll first need to become familiar with the fundamental operations.

          To perform basic tasks with JAR files, you use the Java Archive Tool provided as part of the Java Development Kit. Because the Java Archive tool is invoked by using the jar command, for convenience we'll call it the "Jar tool".

          As a synopsis and preview of some of the topics to be covered in this lesson, the following table summarizes common JAR-file operations:

          OperationCommand
          To create a JAR filejar cf jar-file input-file(s)
          To view the contents of a JAR filejar tf jar-file
          To extract the contents of a JAR filejar xf jar-file
          To extract specific files from a JAR filejar xf jar-file archived-file(s)
          To run an application packaged as a JAR file 
          (version 1.1)
          jre -cp app.jar MainClass
          To run an application packaged as a JAR file 
          (version 1.2 -- requires Main-Class
          manifest header)
          java -jar app.jar
          To invoke an applet packaged as a JAR file
          <applet code=AppletClassName.class
                  archive="JarFileName.jar"
                  width=width height=height>
          </applet>

          只有注冊用戶登錄后才能發表評論。


          網站導航:
          博客園   IT新聞   Chat2DB   C++博客   博問  
           
          主站蜘蛛池模板: 海门市| 吴江市| 类乌齐县| 溧阳市| 瑞丽市| 视频| 赣榆县| 新河县| 九龙县| 房产| 社旗县| 祥云县| 西贡区| 东乌| 屏东县| 元氏县| 合水县| 延长县| 石阡县| 民权县| 武城县| 增城市| 虹口区| 孟连| 昭平县| 松滋市| 达拉特旗| 平陆县| 简阳市| 乐亭县| 安阳市| 黑龙江省| 宝兴县| 环江| 海盐县| 鹰潭市| 晴隆县| 福贡县| 那坡县| 陆丰市| 平陆县|