<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">Configuration is done via reflection using config.xml. Config.xml brings in a couple of classes in BibleDesktop for converting via xslt. I’ve begun to look into migrating it to JSword. Problem is that I have to break the dependency on Font which is in AWT.</div><div class=""><br class=""></div><div class="">The converter reflects to a class in BibleDesktop which looks for xsl/cswing/simple.xsl as a resource. If that resource is not found via classpath it fails.</div><div class=""><br class=""></div>The resources are in the BibleDesktop project. Just copy xsl/cswing/simple.xsl to the resource folder of JSword. Or add the BibleDesktop resource folder to the APIExamples classpath.<div class=""><br class=""></div><div class="">The only execution problem I found is that ESV has been renamed. So I’ll change the example to KLV (the Klingon Bible) as that won’t change.</div><div class=""><br class=""></div><div class="">DM<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Dec 21, 2017, at 7:22 AM, Tim Hawes <<a href="mailto:trhawes@althusius.net" class="">trhawes@althusius.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta content="text/html;charset=UTF-8" http-equiv="Content-Type" class=""><div class=""><div style="font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;" class=""><div class="">Thank you so much for looking into this! But, no, I don't think that's it. If I comment out the call to readStyledText(), I get this exception instead:<br class=""></div><div class=""><br class=""></div><div class="">Exception in thread "main" java.util.MissingResourceException: Cannot find resource: xsl/cswing/simple.xsl<br class=""></div><div class=""> at org.crosswire.common.util.ResourceUtil.getResource(ResourceUtil.java:75)<br class=""></div><div class=""> at org.crosswire.common.util.ResourceUtil.getResource(ResourceUtil.java:57)<br class=""></div><div class=""> at com.selfdidactic.APIExamples.searchAndShow(APIExamples.java:286)<br class=""></div><div class=""> at com.selfdidactic.APIExamples.main(APIExamples.java:465)<br class=""></div><div class=""><br class=""></div><div class="">That error does go away when I add that stylesheet from bibledesktop. So that should probably still be moved to jsword. But is seemingly unrelated to the NullPointerException I am getting when I call readStyledText() in the APIExamples.java<br class=""></div><div class=""><br class=""></div><div class="">I've searched for other references for ConverterFactory.getConverter() in bibledesktop. I can see where it is being called, but am clueless why it seems to work for bibledesktop and not for the API examples.<br class=""></div><div class="zmail_extra"><div id="Zm-_Id_-Sgn1" class=""><div class=""><br class=""></div><div class="">---- On Wed, 20 Dec 2017 23:20:54 -0500 <b class="">DM Smith <<a href="mailto:dmsmith@crosswire.org" class="">dmsmith@crosswire.org</a>></b> wrote ----<br class=""></div></div><div class=""><br class=""></div><blockquote style="border-left: 1px solid #cccccc; padding-left: 6px; margin:0 0 0 5px" class=""><div class=""><div class="">I’ll check it out. I think that JSword’s example uses the xslt from BibleDesktop. I’ve been working on that. <br class=""></div><div class=""><br class=""></div><div class=""><div class="">I should move it into JSword. <br class=""></div><div class=""><br class=""></div><div class=""><div class="">— DM Smith<br class=""></div><div class=""><br class=""></div></div><div class=""><div class=""><br class=""></div><div class="">On Dec 20, 2017, at 7:54 PM, Tim Hawes <<a href="mailto:trhawes@althusius.net" class="">trhawes@althusius.net</a>> wrote:<br class=""></div></div><div class=""><br class=""></div><blockquote class=""><div class=""><div class=""><span class="">_______________________________________________</span><br class=""></div><div class=""><span class="">jsword-devel mailing list</span><br class=""></div><div class=""><span class=""><a href="mailto:jsword-devel@crosswire.org" class="">jsword-devel@crosswire.org</a></span><br class=""></div><div class=""><span class=""><a href="http://www.crosswire.org/mailman/listinfo/jsword-devel" class="">http://www.crosswire.org/mailman/listinfo/jsword-devel</a></span><br class=""></div></div></blockquote></div><div class="">_______________________________________________ <br class=""></div><div class="">jsword-devel mailing list <br class=""></div><div class=""><a href="mailto:jsword-devel@crosswire.org" class="">jsword-devel@crosswire.org</a> <br class=""></div><div class=""><a href="http://www.crosswire.org/mailman/listinfo/jsword-devel" class="">http://www.crosswire.org/mailman/listinfo/jsword-devel</a> <br class=""></div></div><blockquote class=""><div class=""><div style="font-size: 10pt; font-family: Verdana, Arial, Helvetica, sans-serif" class=""><div class="">When trying to run the APIExamples.java for JSword, it throws this exception:<br class=""></div><div class=""><br class=""></div><div class="">Exception in thread "main" java.lang.NullPointerException<br class=""></div><div class="">at org.crosswire.jsword.util.ConverterFactory.getConverter(ConverterFactory.java:51)<br class=""></div><div class="">at com.selfdidactic.APIExamples.readStyledText(APIExamples.java:163)<br class=""></div><div class="">at com.selfdidactic.APIExamples.main(APIExamples.java:461)<br class=""></div><div class=""><br class=""></div><div class="">It is happening in the readStyledText method where...<br class=""></div><div class=""><br class=""></div><div class="">Converter styler = ConverterFactory.getConverter();<br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Has JSword changed without updating the API examples?<br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></div></div></blockquote></blockquote></div><div class=""><br class=""></div></div><br class=""></div>_______________________________________________<br class="">jsword-devel mailing list<br class=""><a href="mailto:jsword-devel@crosswire.org" class="">jsword-devel@crosswire.org</a><br class="">http://www.crosswire.org/mailman/listinfo/jsword-devel<br class=""></div></blockquote></div><br class=""></div></body></html>