How can I create a .jar file?

前端 未结 6 1168
谎友^
谎友^ 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:17

    The .jar file must contain all your classes that are needed during runtime. That includes the GameWindow$2$10 classes, they are the anonymous inner classes that you wrote in your GameWindow class.

    Other .jar files are not included in your .jar file, but you can reference them using the Class-path attribute in your manifest.

提交回复
热议问题