A Java project represents a view of a project resource in terms of Java elements such as package fragments, types, methods and fields. A project may contain several package roots, which contain package fragments. A package root corresponds to an underlying folder or JAR.
Each Java project has a classpath, defining which folders contain source code and where required libraries are located. Each Java project also has an output location, defining where the builder writes .class
files. A project that references packages in another project can access the packages by including the required project in a classpath entry. The Java model will present the source elements in the required project; when building, the compiler will use the corresponding generated class files from the required project's output location(s)). The classpath format is a sequence of classpath entries describing the location and contents of package fragment roots.
Java project elements need to be opened before they can be navigated or manipulated. The children of a Java project are the package fragment roots that are defined by the classpath and contained in this project (in other words, it does not include package fragment roots for other projects). The children (i.e. the package fragment roots) appear in the order they are defined by the classpath.
An instance of one of these handles can be created via JavaCore.create(project)
.
@see JavaCore#create(org.eclipse.core.resources.IProject)
@see IClasspathEntry
@noimplement This interface is not intended to be implemented by clients.