Initialize the AE Runtime Environment [java] public static void initializski () {EngineInitializer. initializeEngine (); try {AoInitialize aoInit = new AoInitialize (); try {if (aoInit. isProductCodeAvailable (esriLicenseProductCode. esriLicenseProductCodeEngine) = esriLicenseStatus. esriLicenseAvailable) aoInit. initialize (esriLicenseProductCode. esriLicenseProductCodeEngine); else if (aoInit. isProductCodeAvailable (esriLicenseProductCode. esriLicenseProductCodeArcView) = esriLicenseStatus. esriLicenseAvailable) aoInit. initialize (esriLicenseProductCode. esriLicenseProductCodeArcView); else {System. err. println ("check, no ArcGISLicenses. ") ;}} catch (Exception e) {e. printStackTrace () ;}} catch (Exception e) {e. printStackTrace () ;}} get featureclass [java] public static FeatureClass evaluate (String path, String name) throws IOException {FeatureClass featureClass = null; try {ShapefileWorkspaceFactory shapefileWorkspaceFactory = new release (); workspace workspace = new Workspace (shapefileWorkspaceFactory. openFromFile (path, 0); featureClass = new FeatureClass (workspace. openFeatureClass (name);} catch (IOException e) {throw e;} return featureClass ;} calculate the area in the shape file [java]/*** to obtain the area of the shape file surface type * @ param featureClass * @ param type * @ return */public Double getShapeArea (FeatureClass featureClass, string type) {Double allArea = 0d; try {IQueryFilter pQueryFilter = new QueryFilter (); int featureCount = featureClass. featureCount (pQueryFilter); if (type. equals ("polygon") {for (int I = 0; I <featureCount; I ++) {IGeometry ig = featureClass. getFeature (I ). getShape (); Polygon polygon = (Polygon) ig; polygon. getArea () ;}} catch (AutomationException e) {e. printStackTrace ();} catch (IOException e) {e. printStackTrace ();} finally {com. esri. arcgis. system. engineInitializer. release (featureClass);} return allArea ;}