Helix Core P4Java Developer Guide (2020.1)

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