Perforce Public Knowledge Base - P4Java IServer Properties and Usage Options
Reset Search



P4Java IServer Properties and Usage Options

« Go Back



There are a variety of properties you can set for your P4Java application when acquiring an IServer or IOptionsServer object.


Global Usage Options


Setting the program name and version is recommended. You will see these values in your Perforce server log for commands submitted by this application.

IOptionsServer server = 
   ServerFactory.getOptionsServer("p4java://perforce:1666", null, 
      new UsageOptions(props).setProgramName("Colossus").setProgramVersion("1.0"));

Setting Properties

Useful but lesser known properties:


  • PropertyDefs.WRITE_IN_PLACE_KEY can improve sync performance to Windows platforms due to a known Java limitation.
    Properties props = System.getProperties();
    props.put(PropertyDefs.WRITE_IN_PLACE_KEY, "true");
    IOptionsServer server = 
       ServerFactory.getOptionsServer("p4java://perforce:1666", props, null);


Related Links



Was this article helpful?



Please tell us how we can make this article more useful.

Characters Remaining: 255