How can I create a .jar file?

前端 未结 6 1112
谎友^
谎友^ 2021-01-15 15:33

In the tutorial I found out that jar files can be created in the following way:

jar cf jar-file input-file(s)

However, it was not clear wha

6条回答
  •  暖寄归人
    2021-01-15 16:33

    You can create a .jar file, zipping the folder with the compiled classes and renaming the file.

    For instance, if your class files are located in the "game" folder, zip it to game.zip, and rename it to game.jar

    This is really simple and it works!

提交回复
热议问题