Now that you have the latest source code for Spring Rich, you can build the framework by building the alljars and the sandboxjar targets (see Listing B-2).
Listing B-2: Building Spring Rich
[ in spring-rcp-c directory ] ant alljars [output from ant] ant sandboxjar [output from ant]
Building these targets produces the spring-richclient.jar, the spring-richclientresources.jar, the spring-richclient-sandbox.jar, and the spring-richclient-src.zip files in the dist directory.
If you want to build the Petclinic sample application, you need to make a few changes to the samples/petclinic/build.xml [1.7] file, as shown in Listing B-3.
Listing B-3: Petclinic build.xml File
<?xml version="1.0"?> <project name="petclinic-rich" basedir="." default="usage"> <property file="build.properties" /> <property file="project.properties" /> <target name="build-standalone"> <jar jarfile="${dist.dir}/petclinic-standalone.jar"> <manifest> <attribute name="Main-Class" value=¿ "org.springframework.richclient.samples.petclinic.¿ PetClinicStandalone" /> <attribute name="Class-Path" value="lib/acegi-security.jar lib/aopalliance.jar lib/burlap.jar lib/commons-codec.jar lib/commons-logging.jar lib/concurrent.jar lib/forms.jar lib/hessian.jar lib/hsqldb.jar lib/looks.jar lib/spring.jar lib/spring-sandbox.jar lib/spring-petclinic.jar lib/spring-richclient.jar lib/spring-richclient-sandbox.jar lib/spring-richclient-resources.jar" /> </manifest> </jar> </target> </project>
Once the application is built, you should have the petclinic-standalone.jar and the petclinic-clientserver.jar files in the dist directory. Now run the standalone version by executing java -jar petclinic-standalone.jar in the dist directory, which starts the Petclinic sample using the HSQL database implementation. Use user name scott and password wombat to log in. Figure B-2 shows the main window of the Petclinic sample.
Figure B-2: Running the Petclinic application