code: private void definePackage(String className, JarEntryInfo jarEntryInfo) throws IllegalArgumentException {
          int index = className.lastIndexOf('.');
          String packageName = index > 0 ? className.substring(0, index) : "";
          if (getPackage(packageName) == null) {
              JarFileInfo jarFileInfo = jarEntryInfo.getJarFileInfo();
              definePackage(
                      packageName, jarFileInfo.getSpecificationTitle(), jarFileInfo.getSpecificationVersion(),
                      jarFileInfo.getSpecificationVendor(), jarFileInfo.getImplementationTitle(),
                      jarFileInfo.getImplementationVersion(), jarFileInfo.getImplementationVendor(),
                      jarFileInfo.getSealURL()
              );
          }
      }
docs: The default <code>ClassLoader.defineClass()</code> does not create package
  for the loaded class and leaves it null. Each package referenced by this
  class loader must be created only once before the
  <code>ClassLoader.defineClass()</code> call.
  The base class <code>ClassLoader</code> keeps cache with created packages
  for reuse.
  
  @param className class to load.
  @throws  IllegalArgumentException
  If package name duplicates an existing package either in this
  class loader or one of its ancestors.