I have downloaded the source code of Apache Lucene using svn. Now I want to create a jar file for a particular java file in the contrib portion of the code.
the problem is that when I do javac x.java to get a class file and package it into a jar file using jar cf jarfile.jar x.class
the package hierarchy is not preserved in the jar file.
what is the correct way of packaging class files into the jar file maintaining the package hierarchy?
Particularly with svn checked out code is there a better way of packaging selected java files.