code: protected void definePackage(File container, String className) throws IOException {
          int classIndex = className.lastIndexOf('.');
          if (classIndex == -1) {
              return;
          }
          String packageName = className.substring(0, classIndex);
          if (getPackage(packageName) != null) {
              // already defined
              return;
          }
          // define the package now
          Manifest manifest = getJarManifest(container);
  
          if (manifest == null) {
              definePackage(packageName, null, null, null, null, null, null, null);
          } else {
              definePackage(container, packageName, manifest);
          }
      }
docs: Define the package information associated with a class.
  
  @param container the file containing the class definition.
  @param className the class name of for which the package information
  is to be determined.
  
  @exception IOException if the package information cannot be read from the
  container.