Once the Classy Data project is built with the "java-build" profile, you are ready to commence generally portable Java development. Four of the seven project modules are included and described in the following table:
| Module | Description |
|---|---|
| classyjava | Portable lightweight Java Persistence API for persisting objects to SQL databases |
| classyutils | Small utilities library relating to Java beans, logging and multi-tasking |
| many2many-example | Demonstrates many-to-many relationship |
| hello-two-dbs-example | Demonstrates dynamic upgrade of 2 databases |
Usage details will be presented in the Many to Many Sample so a working demonstration is available for reference.
Java IDE
The best way to examine the code and run the examples is with the use of a Java IDE. Classy Tools contains project files for Eclipse IDE, as this is the tool chosen for development. However, any Java IDE is suitable, and one with a Maven plugin is especially adaptable. Instructions for importing the project into Eclipse follow, but will be similar for any IDE with a Maven plugin. These are some of the considerations for achieving a successful import:
- Dependencies. These are downloaded and stored in the local repository by Maven. An IDE needs to access this repository.
- Resources. The default Maven folder configuration has been applied, but it is possible to make changes. Note that for the examples
to work, resources such as
perisistence.xmlneed to be on the classpath. - Annotation Processing. Dagger dependency injection uses the Java pre-compilier to minimize runtime costs. Configuration details are IDE-specific and may also depend on which version of Java is selected.
- Classpaths. Each module has test classes and resources which require differenct classpaths to main classes. Look for Maven dependencies with "test" scope.
