P4 for Java Programming

P4 for Java is a Java API developed by Perforce that enables applications to access P4 Server, the Perforce enterprise version control system in a “Java natural” and Java-native way. P4 for Java presents P4 Server services and managed resources and files as first-class Java interfaces, classes, methods, and objects, rather than as simple strings or command-line-style functions. This approach makes it easier to integrate the API into Java applications and tools, and is particularly useful for integrating P4 Server into model-view-controller (MVC) contexts and workflows.

P4 for Java is aimed mostly at the following types of Java development:

  • Standalone applications that need to access P4 Server services from within the application
  • Plug-ins for Java tools such as Eclipse, ant, Mylyn, Cruise Control, and so on, that need to communicate with P4 Server
  • J2EE applications, where P4 for Java can be embedded within a servlet and/or presented as a web service or an AJAX binding for client-side use