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

 

Article

P4Java IServer Properties and Usage Options

« Go Back

Information

 
Problem

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

Solution

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

Feedback

 

Was this article helpful?


   

Feedback

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

Characters Remaining: 255