title: What's the Java 9+ replacement for Sun's VirtualListViewControl?
body: <p>I maintain a codebase that uses <code>com.sun.jndi.ldap.ctl.VirtualListViewControl</code> from the old Sun LDAP Booster Pack, and I'm trying to update it to Java 11 standard.</p>
  
  <p>The first issue is that when trying to compile the code you get:</p>
  
  <p><code>...] cannot access com.sun.jndi.ldap.BasicControl
    class file for com.sun.jndi.ldap.BasicControl not found</code></p>
  
  <p>This can be fixed by adding the following to the compiler args:</p>
  
  <p><code>--add-exports java.naming/com.sun.jndi.ldap=ALL-UNNAMED</code></p>
  
  <p>This allows the Booster Pack code on the classpath to access the internal <code>com.sun.jndi.ldap.BasicControl</code> in the <code>java.naming</code> module, and everything works.</p>
  
  <p>However, using <code>--add-exports</code> is ugly and, more pertinently, is incompatible with using the <code>--release</code> option to ensure you build to a particular code level and API.</p>
  
  <p>I've been hunting around but I can't seem to find anything resembling either an updated/modularized ldapbp or an alternative implementation of a VLV control.</p>
  
  <p>So my question is: What is the official or accepted replacement for Sun's old <code>VirtualListViewControl</code> that plays nicely with Java 9+, or is there another way of using the old one that doesn't require <code>--add-exports</code>?</p>