prompt> java -classpath /FOO/CS.jar csearch/CorpusSearchNote that we are assuming Unix path syntax and that FOO is a top-level directory. The classpath must give the full path, using appropriate syntax.
java -classpath C:\Program Files\CS_version.jar csearch/CorpusSearch
Note the change in direction of the slashes. This is not a typo! |
Alternatively you can include the query and source file(s) on the command line:
java -classpath C:\Program Files\CS_version.jar csearch/CorpusSearch query.q source.psdIn this format the output file will automatically be given the same name as the query file with the extension .out (i.e., in the example query.out).
You can save some typing by putting the 'classpath' in an autoexec.bat file, as follows:
set CLASSPATH=C:\Program Files\CS_version.jarwhere, as above, CS_version.jar stands for whichever version of CS2 you have downloaded, e.g., CS_2-002.18.jar. If you've put the CS_version.jar file in some directory other than C:\Program Files, replace this with the correct directory name.
If you're planning to upgrade frequently and don't want to be constantly editing the autoexec.bat file, you can instead use a standard filename in the autoexec.bat file (such as CS.jar) and each time you get a new version of CS2, simply copy (or rename) it to CS.jar, thereby making CS.jar the current version.
This works with Windows 2000 Professional; unfortunately different versions of Windows differ somewhat, and it may not work, exactly as advertized, with all recent versions. |
java csearch/CorpusSearchor for command line control
java csearch/CorpusSearch query.q source.psdIf you are using Windows, we recommend downloading a copy of the Java Virtual Machine (Java Runtime Environment) from Sun, version 1.4 or later (http://java.com/en/) rather than running Microsoft's Java. To check which virtual machine you are running under Windows, in the command window, type:
java -versionIf you have been using CorpusSearch 1.1, you should already have the Sun Java Runtime Environment.