P4Java Programming

P4Java is a Java API developed by Perforce that enables applications to access Helix Server, the Perforce enterprise version control system in a “Java natural” and Java-native way. P4Java presents Helix 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 Helix Server into model-view-controller (MVC) contexts and workflows.

P4Java is aimed mostly at the following types of Java development:

  • Standalone applications that need to access Helix 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 Helix Server
  • J2EE applications, where P4Java can be embedded within a servlet and/or presented as a web service or an AJAX binding for client-side use