[jsword-devel] runtime error running APIExamples.java using default setting of BIBLE_NAME="KJV"

phil curb jswordtestem at yahoo.co.uk
Tue Mar 6 01:16:54 MST 2007


I managed to load projects: common,jsword,common-swing,bibledesktop. From the SVN each as its own project.  That works fine.
  I managed to get APIExamples.java to run.
   
  But I get a runtime error.
   
  By default it's KJV because APIExamples.java says 
  BIBLE_NAME = "KJV"
   
  The main method first calls  readPlainText()
  public static void main(String[] args)
  {
  APIExamples examples = new APIExamples();
  
  examples.readPlainText();
  examples.readStyledText();
  examples.readDictionary();
  ......
  }
   
  it crashes within the readPlainText() method.
   
  readPlainText has
  public void readPlainText() throws BookException, NoSuchKeyException
  {
   
  Books books = Books.installed();
  // At this point it only installs WLC, not KJV. I know 'cos I watched the variable in Eclipse.
   
  
  Book bible = books.getBook(BIBLE_NAME);
  //bible==null   because KJV doesn't exist
  
   
  Key key = bible.getKey("Gen 1 1"); //$NON-NLS-1$
  //I think by this point we have a null pointer exception
   
   
   
  //So it doesn't even get to
  ..........................
  System.out.println("The plain text of Gen 1:1 is " + text); //$NON-NLS-1$
   
  }
   
   
  I guess I need to somehow install KJV. 
   
  How? 
  I notice some "raw" files here
  http://www.crosswire.org/sword/modules/ModDisp.jsp?modType=Bibles
  Where would I extract the KJV files to?
   
  I notice that even the "raw" one isn't plain text.  It's in a ztext directory, and is perhaps compressed. I doubt it's zip. If I rename it as zip it won't open in winzip. I was hoping for some xml perhaps.
   
  Thanks in advance

 		
---------------------------------
 The all-new Yahoo! Mail goes wherever you go - free your email address from your Internet provider.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.crosswire.org/pipermail/jsword-devel/attachments/20070306/dba4e1e1/attachment.html 


More information about the jsword-devel mailing list