[jsword-devel] webstart

Don Parris evangelinux at matheteuo.org
Fri Sep 3 08:17:01 MST 2004


DM Smith wrote:
> Troy,
>    I had not looked at the program before. It is really useful! A few 
> months ago, I tried refreshing my Greek by reading along in Nestle/Aland 
> in church while scripture was being read in English.
>    Today, I had a go at the flash cards. I was amazed by how much I 
> remembered and by how much I forgot.
> 
> Anyway, wrt your question:
> 
> Can you recommend a SVN client for WinXP or plugin for Eclipse. If so, I 
> will give it a go.
> 
> Quick tutorial on webstart. (I.e. what I learned the hard way)
> Webstart uses jnlp files, which is an XML descriptor of an application 
> and its resources.
> All resources need to be in jar files and the program must be able to 
> get them out of the jar.
> When jars are listed, the one with the "main" needs to be listed first.
> Webstart can display an icon and a splash that is not in a jar. This is 
> a niceity that makes the solution look more complete.
> Each jar needs to be signed by the same authority using jarsigner. (I.e. 
> use the same keystore)
> The jars and the jnlp file need to be in the same directory.
> If your application accesses the internet or the local filesystem, it 
> will need to be granted security permissions. The simplest is to grant all.
> There is no way to pass command line parameters (that I am aware of).  
> But properties can be set. Mark has recommendations for MacOS.
> 
> Here is a sample jnlp file:
> <jnlp spec="1.0+" 
> codebase="http://www.crosswire.org/ftpmirror/pub/flashcards" 
> href="flashcards.jnlp">
> 
>  <information>
>    <title>Flash Cards</title>
>    <vendor>Crosswire Bible Society</vendor>
>    <homepage href="http://www.crosswire.org/flashcards/"/>
>    <description>Flash Cards</description>
>    <description kind="short">Flash Cards  is a Bible study tool 
> available over the internet</description>
>    <description kind="tooltip">Flash Cards</description>
>    <icon href="icon.gif"/>
>    <icon kind="splash" href="splash.gif"/>      <offline-allowed/>
>  </information>
> 
>  <security>
>    <!--
>    We need disk io to read installed Flash lessons.
>    For simplicity, we are asking for all permissions.
>    -->
>    <all-permissions/>
>  </security>
> 
>  <resources>
>    <j2se version="1.4+" max-heap-size="512m"/>
>    <jar href="Flash.jar"/>
>    <jar href="FlashLessons.jar"/>
>  </resources>
> 
>  <application-desc main-class="flash.Quiz"/>
> 
> </jnlp>
> 
> The one for the editor would be very similar. However, it would maintain 
> a separate installation of everything. The only way I see around this 
> would be to merge the two programs into one and make the editor a menu 
> option.
> 
> The only change to FlashCards that I see is that the *.flash are not in 
> a jar. They would need to be put into a jar and served from there. The 
> code to get them out of the jar is pretty simple, you getResource(...) 
> using an absolute path relative to the start of the jar. So if the 
> lessons are in FlashLessons.jar in a directory named lessons, then 
> lesson 3 would be gotten with getResource("/lessons/chapter03vocab.flash").
> 
> Alternatively, it can be done as we have done in jsword. We have put 
> ~/.jsword on the lookup path for resources. The program will do lookups 
> there first and failing that then look in the jars. This allows for 
> overrides and extensions.
> 
> The easiest way to get this "for free" is to include common.jar from the 
> jsword project and add these lines to your main program:
>            String path = System.getProperty("user.home") + 
> File.separator + DIR_PROJECT;
>            home = new URL(NetUtil.PROTOCOL_FILE, null, path);
>            CWClassLoader.setHome(home);
> where dir project is something like:
> private static final String DIR_PROJECT = ".flashcards";
> 
> So what would you like?
> 
> Troy A. Griffitts wrote:
> 
>> Might anyone be willing to consider writing a webstart installer 
>> thingy for our Flashcards application?  We have some students in class 
>> who have had trouble unzipping and finding the correct jar to double 
>> click, and it would be a great blessing to many people, and me, 
>> personally, if we had something to help this process.
>>
>> SVN checkout with similar to:
>>
>> svn co https://crosswire.org/svn/flashcards/trunk flashcards
>>
>> Thank you for considering,
>>         -Troy.
> 
> 
> 
> _______________________________________________
> jsword-devel mailing list
> jsword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/jsword-devel
> 
Troy

Just so you know, when people visiting the Freely Project or 
Linux4Christians express a desire to get involved with a development 
project, we usually suggest any of the Sword projects along with a couple of 
others.  So y'all may see a few new guys come through.

Don


More information about the jsword-devel mailing list