The Perl CD Bookshelf

About Searching on Windows

When you put the CD into your computer, the search server should have started automatically. When it is running, you will have both a console (entitled JRE or NetResults depending on its state) and a button labeled "Exit Search Service".

The first time the server runs, it will prompt you for a place to store temporary files. Unless you have a strong objection, the default of C:\TEMP should be fine.

If you have shut the server down, or if it failed to start for you, you can run NetResults.bat in the CD's root directory.

The AUTORUN.INF file should also install a Java interpreter.

Windows runs the AUTORUN.INF every time the CD is inserted. If you eject the CD and re-insert it while the search engine is running, Windows will attempt to to start a second server. This will not work. To prevent this, or if at any time you don't want to automatically launch the search server, hold down the Shift key while the CD is loading.

If you experience any problems running the server:

If not, or if the advice in those suggestions doesn't work, please do the following:

  1. Open an MS-DOS prompt

  2. Change to the netresults directory on the CD-ROM; e.g.,

    C:\> d:
    D:\> cd netresults
    D:\netresults>
    
  3. Run the search server manually with these parameters:

    D:\netresults> jvm\win\bin\jre -mx16m -cp . -ms8m itm.nr.serve.NRServer +ds +es +vs
    

Then try the search again. The console will show more debugging information; have this available when contacting us.

If you copy the CD to your hard drive

The server assumes that all the files from the CD will be in the root of some drive. If you put the files into a directory, you'll need to alter the configuration file. Unfortunately, this is a little complicated.

  1. Let the search engine run once normally. This will prompt you for a temporary directory, defaulting to C:\TEMP. The server will install some files there.

  2. In the temporary directory you specified, find the file Server.cfg. Open it in Notepad or WordPad. This file uses UNIX line breaks and will look like a mass of text. Please do not alter those line breaks.

  3. Search for CD_PATH. Change the string there from /C: (or whatever drive is given) to the full path to your installation, e.g. /C:/reference/perlcd. Note the use of forward slashes, not backslashes, and note also that there is no slash at the end.

  4. Save the file under another name, like nr-hd.cfg (if you're using Notepad, make sure Word Wrap is turned off first).

  5. Open a DOS window.

  6. Go to the netresults directory in the CD copy.

    C:> cd reference\perlcd\netresults
    C:\reference\perlcd\netresults>
    
  7. Run the search server manually with a new parameter pointing to the exact location of the new configuration file:

    C:\reference\perlcd\netresults> jvm\win\bin\jre -cp . -ms8m itm.nr.serve.NRServer +prop=c:\temp\nr-hd.cfg
    

    where the value of prop is the full path to the new config file you saved (note that Notepad may have saved it as a .txt file).

You should now be able to search the CD's contents.

If you are using Opera

Because the Opera Web browser is stricter about standards than the search engine, users of Opera will not be able to search with the engine's default configuration. The search engine can be reconfigured to work properly, but the steps necessary are, unfortunately, a little complicated.

  1. Let the search engine run once normally. This will prompt you for a temporary directory, defaulting to C:\TEMP. The server will install some files there.

  2. In the temporary directory you specified, find the file Server.cfg. Open it in Notepad or WordPad. This file uses UNIX line breaks and will look like a mass of text. Please do not alter those line breaks.

  3. Search for NO_RESULT_URL. Change the string there from file:/c|/temp/noResults.html to http://localhost:6016/noResults.html. (Note that the exact string you are replacing will be different if you specified a different temporary directory.)

  4. Search for TEMP_HTML_URL. Change the string there from file:/c|/temp/ to http://localhost:6016/. (Again, the exact original string may vary.)

  5. Save the file under another name, like nr-http.cfg (if you're using Notepad, make sure Word Wrap is turned off first).

  6. Open a DOS window.

  7. Go to the netresults directory on the CD.

    C:> e:
    E:> cd netresults
    E:\netresults>
    
  8. Run the search server manually with a new parameter pointing to the exact location of the new configuration file:

    E:\netresults> jvm\win\bin\jre -cp . -ms8m itm.nr.serve.NRServer +prop=c:\temp\nr-http.cfg
    

    where the value of prop is the full path to the new config file you saved (note that Notepad may have saved it as a .txt file).

You should now be able to search normally.


The The Perl Perl in a Nutshell Learning Perl Learning Perl on Win32 Systems Programming Perl Advanced Perl Programming Perl Cookbook