1. 程式人生 > >java語言對arcgis進行二次開發

java語言對arcgis進行二次開發

本文章是在已安裝arcgis(最好是完整版,在ArcGIS_Desktop資料夾下面含有SDK_java,並保證其已安裝)並且javaJDK已安裝且環境變數都已經配置好的前提下適用,具體怎麼安裝去網上搜吧有很多相關教程。(由於SDK_java只支援32JDK,所以請保證你的jdk版本為32位,同時Eclipse也應為32位

所需外掛:EMF-2.6.1GEF-3.6.2、VE-Updata-1.5.0安裝順序EMF-->GEF-->VE;

安裝方法:開啟Eclipse-->help-->Install new Software-->add-->local....找到下載的上述外掛,依次安裝完成。

arcgis外掛安裝方法:開啟Eclipse-->help-->Install new Software-->add-->local,找到..\ArcGIS\DeveloperKit10.2\java\tools\eclipse_plugin\arcgis_update_site\arcobjects檔案     夾,安裝完成。

在上述所需外掛全部安裝完成後,重啟eclipse即可。

例項測試:在eclipse 左邊,右鍵-->new-->other-->Esri Templates資料夾下面-->ArcObjects Project-->next-->完成

執行後:

有可能出現的問題:

執行異常:Exception in thread "main" java.lang.RuntimeException: AutomationException: 0x80040112 - 
at com.esri.arcgis.interop.Ocx.<init>(Unknown Source)
at com.esri.arcgis.controls.ToolbarControl.<init>(Unknown Source)
at com.esri.arcgis.beans.toolbar.ToolbarBean.a(Unknown Source)
at com.esri.arcgis.beans.toolbar.ToolbarBean.<init>(Unknown Source)
at BasicViewer.getToolbarBean(BasicViewer.java:146)
at BasicViewer.getJContentPane(BasicViewer.java:110)
at BasicViewer.initialize(BasicViewer.java:87)
at BasicViewer.<init>(BasicViewer.java:77)
at BasicViewer.main(BasicViewer.java:134)
Caused by: AutomationException: 0x80040112 - 
... 9 more

解決辦法:arcgis license 沒有破解或者沒有啟動,重新破解,並啟動後即可;

--