Java package overview

The P4 API for Java API contains the following main public packages:

  • com.perforce.p4java: the main p4java package hierarchy root. Contains a small handful of API-wide definitions and classes for activities like logging, tracing, and package metadata.
  • com.perforce.p4java.server: contains the server factory class, IServer, and IOptionsServer server interfaces, and associated classes and interfaces. IOptionsServer extends IServer and is the preferred interface. This package enables participating applications to connect to P4 Servers and start interacting with P4 Server services through the IServer interface.
  • com.perforce.p4java.client: defines the IClient client interface and associated classes and support definitions. Participating applications typically use the IClient interface to access P4 Server client services such as syncing and adding, editing, or deleting files.
  • com.perforce.p4java.exception: defines the main publicly-visible exceptions likely to be encountered in general use, and some specialized and rarely-encountered errors.
  • com.perforce.p4java.core: contains interface definitions for major P4 Server-managed objects such as changelists, jobs, and clients.
  • com.perforce.p4java.core.file: contains the main IFileSpec interface for accessing and defining the various types of files that P4 Server manages (for example, depot, local, and client), along with associated definitions.
  • com.perforce.p4java.impl.generic: root package for “generic” or standard implementations of many useful P4 Server client, changelist, job, and similar interfaces. These implementations are available for use by participating applications, but are not mandatory.