最近这几天一直在看一些gridsphere方面的资料,gridsphere为网格开发提供了一个门户,在其上我们可以搭建很多portal应用。要使用gridsphere开发,首先的问题就是要能够在机器上跑通gridsphere,也就是能够编译运行。gridsphere是用java语言编写的,java的开发环境Eclipse算是最熟悉不过了,如何能在Eclipse里跑通gridsphere是个问题,看了gridsphere官方网站上的文档,感觉说得不是很清楚。我自己调了多次,终于成功,步骤如下:
相关软件:Eclipse3.2 、 gridsphere2.2.8 、Tomcat5.0
1. 在Eclipse中新建工程命名为gridsphere,右击工程选择Import-import file system-gridsphere2.2.8解压文件夹。
2. 选择工程-properties-java build path ,librabries选项卡选择导入ant.jar、ant_contrib.jar和gridsphere下所有jar文件。
3. 选择build.xml-run as... ,Environment中添加变量CATALINA_HOME赋值Tomcat安装路径。targets中选择setenv和install,run
运行成功会提示:gridsphere successfully installed。
4. 启动Tomcat,输入http://localhost:8080/gridsphere/gridsphere大开gridsphere门户界面。
至此,运行环境搭建成功!