title: How to load class from another package?
body: <p>I want to load class from another package(operators is the package name)  .I use this statment  :</p>
  
  <pre><code>File operatorFile = new File(operatorPath);
  URL operatorFilePath = operatorFile.toURL();          
  URL[] operatorFilePaths = new URL[]{operatorFilePath};
  ClassLoader operatorsLoader = new URLClassLoader(operatorFilePaths);
  
  Class operatorInterface = operatorsLoader.loadClass("operators.Operator");
  </code></pre>
  
  <p>But at runtime I got this exception  :</p>
  
  <p><a href="https://i.stack.imgur.com/RjCCT.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RjCCT.jpg" alt="enter image description here"></a></p>
  
  <p>I don't know the way I call Is not correct or other problem Is there with my code  .Can any one help me?</p>