Answer the question
In order to leave comments, you need to log in
How to create jar programmatically?
I want to write a compiler for a simple language into jvm bytecode. But it is necessary that the output is one executable file, i.e. jar. How can I package compiled classes into a jar programmatically?
Answer the question
In order to leave comments, you need to log in
The JDK has a standard JarOutputStream class to help you. Here is an example of writing to a JarOutputStream along with a manifest.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question