[jsword-devel] Lost in source

Norbert Plött jsword-devel@crosswire.org
Thu, 11 Mar 2004 20:43:49 +0100


Hello jsword fellows!

I got the jsword sources because I want to check some word statistics that I 
found and I thought that jsword together with the annotated KJV and Strong's 
numbers would be just the thing to use.
The API primer source example looked neat and simple so I got the sources. The 
ant build runs without errors or warnings. Starting jsword works from the 
shell command prompt. Wonderful.

So I tried to run the following example, which is formed after the API primer 
code:

    public void readPlainText() throws BookException, NoSuchVerseException
    {
        Context.enter();   
        Defaults.setBibleByName("GerSch");
        
        Passage ref = PassageFactory.createPassage("Mat 1 1");
        Bible bible = Defaults.getBibleMetaData().getBible();

        BookData data = bible.getData(ref);
        String text = data.getPlainText();

        System.out.println("The plain text of Mat 1:1 is "+text);
    }

Defaults.setBibleByName("GerSch") fails with an exception, apparently because 
some resources are not found and some things are not initialised which should 
be initialised. But frankly, I feel a little bit lost in source because I 
lack some overview documentation on the prerequisites like which files must 
be in which place for the infrastructure of jsword to work. It's probably 
just a little trick ... Like a command line parameter when I start my test 
application from the NetBeans 3.5 IDE?

My environment is

SuSE Linux 9.0, KDE desktop, Java 1.4.2 VM, NetBeans 3.5 as IDE.

Can anybody give me a clue what to do next?

Regards,


Norbert