• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4737
  • Last Modified:

making "jar" files with intellij idea

How can i build ".jar" output for my project in intellij idea?
0
somebody314
Asked:
somebody314
  • 2
1 Solution
 
gdrnecCommented:
I always find that the easiest way of building a project (creating your jar) is to use ant. IntelliJ has ant support so it should be straight forward. Just create a new jar ant task and give it the files you want included and then execute the ant script.

The ant task looks something like this:

<jar basedir="${build-location}" destfile="${deploy-location}\jarname.jar"/>


Very simple.
0
 
somebody314Author Commented:
But how can i create a new jar ant task?
I have seen "Create ant file" or something like that in the build menu but it does nothing with outputting ".jar" files.
0
 
gdrnecCommented:
It does actually. If you create a new ant file (usually called build file) and then add a task to the ant file as above. When you execute the ant file, it will do the task and build your jar.

Geoff
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now