P4Java Release 2012.1 and later includes support for connecting to an SSL enabled Perforce Server.
For connection details, see the P4Java API User's guide section on "SSL Connection Support".
From that section:
The Perforce Server at release 2012.1 or higher supports 256-bit SSL connections. Due to current US export control restrictions for some countries, the standard JDK package only comes with 128 bit encryption level cyphers. In order to use P4Java to connect to an SSL-enabled Perforce server, those living in eligible countries may download the unlimited strength JCE (Java Cryptography Extension) package and replace the current default cryptography jar files with the unlimited strength files.
The JCE package's README.txt file gives install instructions.
In summary, replace the local_policy.jar and the US_export_policy.jar files found in the security directory
with the identically named files within the the download specific to your version of Java.
This must be done on every machine running your P4Java client. Running JVMs must be restarted. Nothing needs to be done on the Perforce Server machine.
Oracle (Sun) JVMs:
Java 6: http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html
Java 7: http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html
Java 8: http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
The JCE packages can be obtained by:
- Go to http://www.ibm.com/developerworks/java/jdk/security/
- Choose your Java Version
- Navigate to "IBM SDK Policy files"
- Go to the link provided at "Unlimited jurisdiction policy files can be obtained from the ibm.com web site."
- Log in with your IBM ID
- Download "FOR OLDER VERSIONS", because although the JRE is Java 7, it's OLDER than Java 7 SR 4
Determining JAVA_HOME for Eclipse
- Within Eclipse, click menu Help -> About Eclipse
- Click the Installation Details button.
- Select the Configuration tab
- Find the java.home property
In the example below, the files to replace would be located in the "C:\Program Files\Java\jre7\lib\security" directory