Reputation: 1
I have a java project and using IntelliJ in project settings I've created an Artifact JAR. My project is of the form:
Where MyTest.java references MyInterface.jar.
When I run [Build -> Build Artifacts -> MyTest.jar -> Build] IntelliJ creates a jar that simply contains MyInterface.class and MyTest.class. I'm using this JAR as a library in another project.
What I need is to be able to create this JAR without having to use IntelliJ or Maven or anything other than javac and jar (due to constraints on the machine this code will be deployed to). Is this possible and if so how can I go about doing this using the command line only?
Upvotes: 0
Views: 748
Reputation: 1
jar cf ${name for the created jar} input-file(s)
or cd
into your package directory then use:
jar cf ${name for the created jar} *
Upvotes: 0