开源gvSIG环境搭建
gvSIG网上资料实在太少,自己Java功底也不深,所以感觉比较头疼,好歹周围有不少Java高手,可以请教,在自己深入的研究和高手的指导下,终于能够运行起来,回过头来说说,环境搭建,也让后来者能有点资料可查。
1.从http://www.gvsig.org/web/projects/gvsig-mobile/网站上下载gvSIG源码project_gvSIG_Mobile_Pilot-0.3-src_0
2.打开MyEclipse8.5以文件形式打开,编译,会发现libLocation有错误,缺少一个dinopolis-util-0.5.3.jar包,从网上搜下找到这个夹包,导入编译成功
3.打开appGvsigMobile工程,按照以下步骤做设置。
(1)设置Java VM为j2sdk1.4 compliant VM (Window->Preferences->Java->Installed JREs).
(2)设置JDK compliance level to 1.4 (Window->Preferences->Java->Compiler).
(3)构建 boot project (build.xml->right click->Run As->Ant Build)
(4)Add generated boot/deploy/boot.jar to the JRE (Window->Preferences->Java->Installed JREs->Edit->Add External JARs...).
(5)Select all projects and clean (Project->Clean).
(6)Now you should be able to build appGvsigMobile project (build.xml->right click->Run As->Ant Build).
(7)Create a new Run configuration for a Java Application (Run->Run...->Java Application). Select project appGvsigMobile and class Launcher. In the Arguments tab add:
- Program arguments: m=J9 s=480x600 l=es p="${workspace_loc}"
- VM arguments: -Xmx256M -Djava.library.path=${workspace_loc}/resources/lib/Lin_X86
如果不出意外,就能配置成功
4.在appGvsigMobile工程上点击,java运行方式-》Java应用程序 选择Launcher,即可
见效果图: