## How-to

1. How do I compile ensj code?
2. How do I set up ant?
3. How do I check ensj is installed correctly?
4. How do I run ensj's unit tests?
5. How can I access ensembl data bases without installing them locally?

1. How do I compile ensj code?
   1. Checkout ensj-core from the cvs repository.
   2. Build. Do this however you normally build java files or use the supplied ant build.xml file. Run `ant compile` in the ensj-core directory.
2. How do I set up ant?

   Here is a quick guide, see the ant website for detailed instructions.

   1. Include the optional.jar file in ant's lib directory.
   2. Configure your environment. Example configuration of environment variables in bash.

          export ANT_HOME=/usr/local/ant export
          JAVA_HOME=/usr/local/jdk-1.2.2
          export PATH=${PATH}:${ANT_HOME}/bin

3. How do I check ensj is installed correctly? Run `org.ensembl.Example` to test that ensj is installed correctly run. e.g. `java -jar PATH-TO-JAR/ensj.jar`.

   Preconditions:

   - You must be able to connect to ensembldb.ensembl.org.
   - All support jars must be in the same directory as ensj.jar. At the time of writing mysql*.jar was the only necessary jar.
4. How do I run ensj's unit tests? Ensj has many JUnit regression tests and they can be run in several ways:
   - Test suites can be run directly. e.g.
     - Run the gene test: `java -cp ensj.jar junit.textui.TestRunner org.ensembl.test.GeneTest`
     - Run all the tests for the core databases: `java -cp ensj.jar junit.textui.TestRunner org.ensembl.test.AllTests`
   - Test suites can be run via one the ant targets "all-tests", "core-tests", "compara-tests" and "variation-tests". e.g.
     - Run the core database tests `ant core-tests`
5. How can I access ensembl data bases without installing them locally?

   You can use the data releases available on ensembldb.ensembl.org, our public mysql database. Use these parameters for the current human database release: host=ensembldb.ensembl.org, database=DATABASE_NAME, username=anonymous, no password).