Java Reference
In-Depth Information
Figure 4.8 Circular dependencies make projects impossible to
build, so IDEA prevents you from defining them.
Circular dependencies aren't allowed: Module A, for example, can't depend on
Module B if Module B depends on A. Larger circular dependencies are likewise
not permitted. If you create a circular dependency, IDEA warns you and keeps you
from applying your changes, as shown in figure 4.8.
Version 5.0 allows circular dependencies, but it warns the user that they aren't rec-
ommended. Version 5.0 is capable of analyzing such dependencies and can assist
in correct organization of the build process for such projects.
4.3.2
Creating a Java module with the module wizard
The primary module used by IDEA for everything other than J2EE applications is
the Java module . The Java module covers everything from a simple command-line
utility, to Swing applications, to libraries with a public API but no direct user inter-
face. Being a generalist, it doesn't provide much in the way of special application
support the way the J2EE modules do. We expect that in the future, specialized
extensions of this module type will be available to ease the creation of common
application themes. Even so, the features of the Java module form the core of the
other module types and are important to learn.
Specifying the type of module to create
If you choose to create a new module from scratch, select the module type from the
list in the Add Module Wizard (figure 4.9), and click Next to continue. This chap-
ter focuses on the Java module; the other module types are covered in chapter 11.
The Add Module Wizard looks different in version 5.0; it supports two new
types of modules.
 
 
 
 
 
 
Search WWH ::




Custom Search