How to create a .jar file.

I am half way through my 1 month trial of IntelliJ and also new to the Java language. At this point in time I would prefer not to configure Ant so I tried to create a .jar file using the IDE Build / Build Jars option but nothing was generated.

My objective is to build a .jar file that contains annotated Hibernate entity classes and reference these entities from another stand-alone swing UI utility. The utility program will build my project’s database schema.

config = new AnnotationConfiguration();
config.addPackage( "mydomain.entity" );

4 comments

I have tried to use the integrated Ant Build in order to generate the .jar file but when I initiate an Ant build, this fails with:

taskdef class com.intellij.ant.Javac2 cannot be found.

Help.


IntelliJ IDEA 7.0.2 on Windows XP

0

I got the same problem with IDEA 7.0.2 while running a ant task (the build.xml is generated by IDEA 7.0.2). The root cause seems to be "java.lang.ClassNotFoundException: com.intellij.ant.Javac2"

0

Looks like there is one bug in IntelliJ JIRA bug database already: http://www.jetbrains.net/jira/browse/IDEA-11299

0

I'm still having this problem in IJ 10

Fixed it, I couldn't use my prop file in a folder

<property file="ant/group_pr_suite.properties"/>

0

Please sign in to leave a comment.