I use the shapefileTable to open the shapefiles on my machine,write with the absolute path.I download the local shapefiles(include .dbf .prj .shp .shx) from google.and all the code are from https://developers.arcgis.com/java/10-2/sample-code/shapefile-feature-layer/ .I only change the shapefileTable line of code.
try {
shapefileTable = new ShapefileFeatureTable("E:\\antarctica-icesheet-polygons-3857\\icesheet_polygons.shp");
featureLayer = new FeatureLayer(shapefileTable);
// create a renderer
UniqueValueRenderer uvRenderer = new UniqueValueRenderer(
new SimpleFillSymbol(new Color(100, 0, 0, 255), null), "icesheet_polygons");
// set renderer
featureLayer.setRenderer(uvRenderer);
jMap.getLayers().add(featureLayer);
the shapefiels(include .dbf .prj ..sbn .sbx shp .shp.xml .shx) that the sample code use are more.Is that the problem?
I HOPE THERE IS SOMEBODY TO HELP ME OUT! THANK YOU!