Installation

This document provides information to numerics4j and how to use it within a Java project.

Manual Installation

The is no formal installation process for numerics4j since it is not an application, merely a toolkit. However, to use numerics4j it must be integrated into a Java development project. In general terms, this consists of the following steps:

  1. Download the binary distribution of numerics4j.
  2. Unarchive the entire distribution or at a minimum extract the numerics4j-1.3.jar.
  3. Add the src/cpp directory of the expanded archive as an INCLUDE path in your project.
  4. Include numerics4j-1.3.jar in the project classpath.

After those steps have been completed, the numerics4j API should be accessible within the project and coding and compiling can be performed as normal.

Maven 2 Installation

If numerics4j is to be used in a Maven 2 project, numerics4j can be included in the project using Maven's normal dependency bootstrapping provided the correct repository configuration is present in the effective POM. This configuration can be set in a couple of ways. The first way is to add the repository directory to a POM:

<project>
...
  <pluginRepositories>
    <pluginRepository>
      <id>doodleproject-repo</id>
      <name>DoodleProject Maven 2 Repository</name>
      <url>http://doodleproject.sourceforge.net/maven2/release</url>
      <releases>
        <enabled>true</enabled>
      </releases>
    </pluginRepository>
    ...
  </pluginRepositories>
...
</project>

The second way is to add the repository to a profile in the ~/.m2/settings.xml file:

<settings>
 ...
 <profiles>
   ...
   <profile>
     <id>doodleproject</id>
     <pluginRepositories>
       <pluginRepository>
         <id>doodleproject-repo</id>
         <name>DoodleProject Maven 2 Repository</name>
         <url>http://doodleproject.sourceforge.net/maven2/release</url>
         <releases>
           <enabled>true</enabled>
         </releases>
       </pluginRepository>
       ...
     </pluginRepositories>
     ...
   </profile>
   ...
 </profiles>

 <activeProfiles>
   <activeProfile>doodleproject</activeProfile>
 </activeProfiles>
 ...
</settings>

With the repository configured, numerics4j is added to a Maven 2 project by adding the the following dependency to the POM:

<dependency>
  <groupId>net.sf.doodleproject</groupId>
  <artifactId>numerics4j</artifactId>
  <version>1.3</version>
</dependency>