Sentry Spelling Checker Engine for Java |
Home Site index Contact us Catalog Shopping Cart Products Support Search |
You are here: Home > Support > Sentry Spelling Checker Engine > Java SDK > Problems running BackgroundDemo or using BackgroundChecker
Product: Sentry Spelling Checker Engine Java SDK V5.10 and later
Problem: When I try to run BackgroundDemo following the instructions in the Sentry Java SDK Programmer's Guide, I get an error message such as "java.lang.NoClassDefFoundError: BackgroundDemo."
Solution: Examples included with Sentry Java SDK are in source-code form and must be compiled before being run. Compile BackgroundDemo using the following command line:
javac BackgroundDemo.java
Once you have compiled the source code, you should be able to run the demo.
Problem: I can run BackgroundDemo, but I cannot use class BackgroundChecker in my application because BackgroundChecker is in an unnamed package. When I try, I get error messages stating BackgroundChecker is not found, etc.
Solution: As shipped with Sentry Java SDK, Class BackgroundChecker is in an unnamed package (i.e., it contains no "package" declaration). BackgroundChecker can be used in an application which is also in an unnamed application (such as BackgroundDemo). However, before it can be used in an application which is in a named package, the BackgroundChecker.java source file must be modified to specify a package name:
package myapp;
BackgroundChecker.java can then be compiled, and the resulting .class files can be used in an application.
The evaluation version of Sentry Java SDK includes BackgroundChecker and supporting classes in .class form only; the source code is not included. Therefore, with the evaluation version of Sentry Java SDK, BackgroundChecker can be used only with simple applications such as BackgroundDemo. The source code for BackgroundChecker (BackgroundChecker.java) is included with the retail version of Sentry Java SDK. BackgroundChecker.java can be modified as described above to insert a "package" declaration, and the resulting .class file can be used in any application.
Copyright © 2015 Wintertree Software Inc.