title: Import custom Java classes into Server side javascript in Xpages (Lotus Domino 8.5+)
body: <p>With Lotus Domino 8.5.1, one can use "standard" Java classes into server side Javascript (embedded into an Xpage), or Java classes available in the WEB-INF/lib folder. For example : </p>
  
  <pre><code>var driverClass:java.lang.Class;
  var driver:java.sql.Driver;
  var connection:java.sql.Connection;
  var statement:java.sql.Statement;
  driverClass = java.lang.Thread.currentThread().getContextClassLoader().loadClass("org.gjt.mm.mysql.Driver");
  driver = driverClass.newInstance();
  </code></pre>
  
  <p>(sample found here <a href="http://xpageswiki.com/web/youatnotes/wiki-xpages.nsf/dx/Working_with_Java_classes" rel="nofollow noreferrer">here</a>)</p>
  
  <p>However, how could one use our own custom classes defined in Java script libraries ? In an Xpage, one can only import server side javascript libraries (not Java nor LS ones).</p>
  
  <p>Thanks for your help</p>
  
  <p>Cheers</p>