All Files command line folder into the jar package

Applicable scene: all the files in a folder into the jar package

Example: all the files you want to test-sdk folder into the test-sdk.jar file

Icon: test-sdk folder in the case shown in FIG.

Expected: jar file structure you want to generate in a test-sdk.jar -> file that contains the image above, rather than test-sdk.jar -> test-sdk - File> image above

The command line using the following command: jar cvf test-sdk.jar -C test-sdk \.

Precautions: 1 - Note that the command line where you enter this command folder location, should be kept in a folder on the need to package level.

    2 - "- C" should remain uppercase, lowercase error

    Subsequent 2- "Test-SDK \. ", "\" And . "" There is a space between, not less

 

 

 After a successful package will be generated in the same file

 

 

 

 

Guess you like

Origin www.cnblogs.com/Bingfengwangzuo/p/11699361.html