title: hazelcast how to enable user code deployment at member side
body: <p>I'm really new to hazelcast and I'm referring closely to this question <a href="https://stackoverflow.com/questions/54475002/how-to-fix-hazelcast-from-throwing-java-lang-illegalstateexception-user-code-d">How to fix Hazelcast from throwing &#39;java.lang.IllegalStateException: User Code Deployment is not enabled&#39; for EntryProcessor</a>, trying to run the sample codebase for the EntryProcessor. And from my understanding I need to &quot;enable user code deployment&quot; at the member side.</p>
  <p>However, on referring to the documentation here, I'm not too sure how to enable this (based on the same project structure and codebase found here - <a href="https://github.com/hazelcast/hazelcast-code-samples" rel="nofollow noreferrer">https://github.com/hazelcast/hazelcast-code-samples</a>)</p>
  <pre><code>&lt;hazelcast&gt;
      ...
      &lt;user-code-deployment enabled=&quot;true&quot;&gt;
          &lt;class-cache-mode&gt;ETERNAL&lt;/class-cache-mode&gt;
          &lt;provider-mode&gt;LOCAL_AND_CACHED_CLASSES&lt;/provider-mode&gt;
          &lt;blacklist-prefixes&gt;com.foo,com.bar&lt;/blacklist-prefixes&gt;
          &lt;whitelist-prefixes&gt;com.bar.MyClass&lt;/whitelist-prefixes&gt;
          &lt;provider-filter&gt;HAS_ATTRIBUTE:lite&lt;/provider-filter&gt;
      &lt;/user-code-deployment&gt;
      ...
  &lt;/hazelcast&gt;
  </code></pre>
  <pre><code>        Config config = new Config();
          UserCodeDeploymentConfig distCLConfig = config.getUserCodeDeploymentConfig();
          distCLConfig.setEnabled( true )
                  .setClassCacheMode( UserCodeDeploymentConfig.ClassCacheMode.ETERNAL )
                  .setProviderMode( UserCodeDeploymentConfig.ProviderMode.LOCAL_AND_CACHED_CLASSES )
                  .setBlacklistedPrefixes( &quot;com.foo,com.bar&quot; )
                  .setWhitelistedPrefixes( &quot;com.bar.MyClass&quot; )
                  .setProviderFilter( &quot;HAS_ATTRIBUTE:lite&quot; );
  </code></pre>
  <p>Couldn't find this part in the codebase, and not sure where to insert the programmatic part either. Could I get some advice on how to implement this part to make the example code work? (<a href="https://docs.hazelcast.com/imdg/4.2/clusters/deploying-code-on-member.html" rel="nofollow noreferrer">https://docs.hazelcast.com/imdg/4.2/clusters/deploying-code-on-member.html</a>)</p>