I want to generate a jar in a Python script with assets that are dynamically generated and
Could I just create a
.zip file and rename the file extension?
Yes, you can just create a ZIP file and rename the extension. It’s that easy.
Do keep in mind that you might want to add (beside your class files) some metadata related files of a JAR (Java Archive), such as: