Sun Java System Portal Server 7 Developer's Guide

ProcedureTo Install and Run the Search Demo Command Line Program

Steps
  1. Compile the SearchDemo.java file. Make sure the class path includes the SDK JAR file, searchsdk.jar. For example, type:


    javac -classpath PortalServer-base/sdk/searchsdk.jar SearchDemo.java
  2. Create a directory hierarchy that reflects the Java package structure for these classes to use the compiled classes directly, and move the classes into the demo package of this hierarchy.

    For example, type:


    mkdir -p com/sun/portal/search/demo; cp *.class com/sun/portal/search/demo
  3. Invoke the search demo from the command line and supply the address of the search server and the query string as arguments.

    For example, type:


    java -classpath PortalServer-base/sdk/searchsdk.jar com.sun.portal.search.demo.SearchDemo http://portal_server_host_name:port/search-ID/search ’search query’