Integrate Plura into your Java Application or Signed Applet
- Contact us to get your affiliate code.
- Place the Plura JAR on your application's classpath.
- Instantiate an instance of the JavaPluraConnector class and use the JavaPluraConnector methods to start Plura, stop Plura, and change the percentage of client CPU that Plura is using. Make sure that you pass your affiliate code into the JavaPluraConnector constructor!
- If you wish, monitor your clients' usage of Plura and reward them accordingly!
- Each class that implements IPluraConnector manages threads that run Plura. To ensure that Plura threads are not abandoned, ALWAYS invoke stop() after you invoke start(), even if your application exits on error. See the "finally" block in the sample code here.
- We recommend that you specify the following Java opts on the startup of the Plura JVM:
-Xmx256m -Xms256m -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled
- This code will run in Java 1.6 and above.