[jsword-devel] API primer?

Nathaniel Alderson jsword-devel@crosswire.org
18 Dec 2003 20:18:28 -0800

Hey all,

I am interested in learning and using the jsword API but am having a
little trouble understanding it's basic structure. I perused the
APIExample class and thought that I might use it to do some
experimenting, however by looking at the code I can't see how the API
knows where to find my sword modules. I have the feeling I need to use
the Config class but am having problems with the following code:

import org.crosswire.jsword.examples.APIExamples;
import org.crosswire.common.config.Config;
import org.jdom.Document;
import org.crosswire.jsword.util.Project;

 * Describe class <code>JSwordTest</code> here.
 * @author <a href="mailto:"></a>
 * @version 1.0
public class JSwordTest {

     * Describe <code>main</code> method here.
     * @param args a <code>String[]</code> value
    public static void main(String[] args) {
	    Config config = new Config("JSword Test");


And when I run this fruitless code I get the following exception:

Exception in thread "main" java.lang.VerifyError: (class:
org/apache/log4j/LogManager, method: <clinit> signature: ()V)
Incompatible argument to function
	at org.apache.log4j.Logger.getLogger(Logger.java:94)
	at org.crosswire.common.util.Logger.<init>(Logger.java:75)
	at org.crosswire.common.util.Logger.getLogger(Logger.java:43)
	at org.crosswire.common.config.Config.<clinit>(Config.java:502)
	at JSwordTest.main(JSwordTest.java:21)

Any help would be appreciated. By the way, I noticed that there is a
broken link (API Primer) that sounds like what I am looking for.