• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4769
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

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