Starting the WebSpellChecker Server release 5.1.0 and higher, the new grammar engine requires Java 8 and higher. After the installation, on start the Application Server (AppServer) will try to auto-detect a path to an existing Java Virtual Machine (JVM). Also, you have an option to set a path to JVM manually or change the auto-detected path to your custom one. This manual will help you with this.

1. Install Java

First of all, you need to make sure that you have installed Java Runtime Environment (JRE) or Java Development Kit 8+, as both of them contain a Java Virtual Machine (JVM) that is required to run Java programs. The new grammar engine is written on Java.

2. Stop AppServer

Before any changes in the AppServer configuration file (AppServerX.xml), it is strongly recommended stopping AppServer. To do so, please choose one of the options below.


Stop AppServer on a Windows server

There are three possible options how you can stop AppServer on Windows-based environments.

Option A: Go to Windows Start –> All Programs –> WebSpellChecker –> AppServer –> Stop WebSpellChecker Application Server

Option B: Open Command Prompt –> Switch to [WebSpellChecker_Installation_Path]/AppServer –> Run AppServerX -stop

Option C:

  • Go to Windows Start –> Control Panel –> Administrative Tools –> Services
  • Find WebSpellChecker Application Server Service on the list of all services
  • Click Stop


Stop AppServer on a Linux server

Run the stop.sh script to stop AppServer using the following command below:

sudo sh <WebSpellChecker_Installation_Path>/WSC/AppServer/stop.sh

Or your can also run the stop.sh script from the AppServer directory:

/<WebSpellChecker_Installation_Dir>/WSC/AppServer/# sh stop.sh

3. Specify Path to Java Virtual Machine in AppServer Configuration File

  • Locate the AppServerX.xml configuration file in the WebSpellChecker installation folder on your server. 

The default path to the AppServerX.xml file: <WebSpellChecker_Installation_Path>/AppServer/AppServerX.xml

  • Find section with parameters responsible configuration of Java Virtual Machine (JVM) that are required for the grammar engine: <PathToJavaVirtualMachine>...</PathToJavaVirtualMachine>
AppServerX.xml
<!-- At least java 8 is required to use langtool grammar engine. In case of empty tag AppServer tries to detect path to jvm library automatically. -->
<!-- You can put path to jvm library here. Path example for Linux: /usr/lib/jvm/java-8-oracle/jre/lib/amd64/server/libjvm.so. -->
<!-- Path example for Windows: C:/Program Files/Java/jre1.8.0_121/bin/server/jvm.dll -->
<PathToJavaVirtualMachine></PathToJavaVirtualMachine>
<!-- Put maximum heap size restriction in megabytes for langtool in java virtual machine. -->
<JVMMaxMemorySizeMb>256</JVMMaxMemorySizeMb>
  • Use the PathToJavaVirtualMachine parameter to specify a correct path to a JVM on your server.
AppServerX.xml
<PathToJavaVirtualMachine>your_path_to_JVM</PathToJavaVirtualMachine>

4. Start AppServer

As soon as a correct path to JVM is specified in AppServerX.xml, start AppServer to apply changes made using one of the options below.


Start AppServer on Windows

There are three possible options how you can start AppServer on Windows-based environments.

Option A: Go to Windows Start –> All Programs –> WebSpellChecker –> AppServer –> Start WebSpellChecker Application Server

Option B: Open Command Prompt –> Switch to [WebSpellChecker_Installation_Path]/AppServer –> Run AppServerX -start

Option C:

  • Go to Windows Start –> Control Panel –> Administrative Tools –> Services
  • Find WebSpellChecker Application Server Service on the list of all services
  • Click Start


Start AppServer on Linux

Run the start.sh script to start AppServer using the following command below:

sudo sh <WebSpellChecker_Installation_Path>/WSC/AppServer/start.sh

5. Verify Operability

As soon as these steps are performed, the status should change to ACTIVE. You can also check the grammar visiting /samples/ that are shipped with the package.

  • Check the Status of WebSpellChecker Server: 

http(s)://your_host_name:port/spellcheck/script/ssrv.cgi?cmd=status

WebSpellChecker Server Status

Here is a correct status response for Spell Check, Grammar and Thesaurus engines of WebSpellChecker Server:

Spell Check Engine is ACTIVE
Grammar Engine is ACTIVE
Thesaurus Engine is ACTIVE

Please find below the description of the statuses that are received from SSRV component:

'ACTIVE' status means that an Engine works properly.
'NOT ACTIVE' status means that an Engine is not enabled or does not work properly.

For more details and assistance, please contact the technical support team at support@webspellchecker.net.

  • Go to the Samples pages that shipped with the WebSpellChecker Server package and choose any of demo samples with enabled Grammar.

http(s)://your_host_name:port/spellcheck/script/samples

  • Additionally go to logs (e.g. Child-0.log or Child-1.log) files located in AppServer/Logs folder and check if there are any errors appear after you specified path to your JVM. Here is an example of errors that are thrown by AppServer if a path to JVM is not found.
MM/DD/YY:HH:MM:50.821	#18794:0	Subsystem_General	Error	Could not find path to jvm.dll. At least java 8 is required to use grammar engine. You can specify path to jvm library in AppServerX.xml in 'PathToJavaVirtualMachine' tag.
MM/DD/YY:HH:MM:50.821	#18794:0	Subsystem_General	Error	Function execution error (name:check_grammar1, result:-1, params:check_grammar1
test message
-1
en_US
)