[jsword-devel] webstart

DM Smith dmsmith555 at yahoo.com
Sun Sep 5 12:21:43 MST 2004


Troy,

I have checked in the changes. Here is a description of the changes:
Applied Joe's changes of organizing imports, adding .classpath and .project.
I added build.xml, some files from JSword's common that allow getting 
resources from the jar w/ overrides from the local file system.
I modified MainFrame.java in the following ways:
a) When loading lessons, it looks for a jar with a "lessons" directory 
and for the first jar it finds, it gets all the paths for the lesson files.
 These are of the form lessons/dir/lesson.flash
b) after looking for lessons in the jar, it looks for lessons in 
~/.flashcards/lessons.
These are held internally in a map of lesson sets, with each lesson set 
containing a set of its lessons.

Once we have the tree of lessons, the code creates a list of checkboxes. 
The display name of the checkbox is gotten using the new 
ResourceUtil.getResource(path), where path is the path of the lesson 
(which may be in either the jar or in the home lesson directory or both).
This call returns an URL to the "best" location and using the URL a 
connection is opened and an input stream is created, from which a 
properties object is loaded.

Using the same lookup mechanism, the lessons are loaded.

There is an "exercise left for the reader." The editor should be changed 
to read from the "best" location and write them to the home lesson 
directory.

Note this solution does not allow for networked sharing. Lessons are 
kept on a per user basis.

DM

DM Smith wrote:

> Troy,
>
> I have finished and will be in the process of checking it in. (Got to 
> read the svn docs to see how to do compares/merges/checkin/...)
>
> I was able to grok the jar file for the lessons and did not need to 
> resort to having a manifest.
>
> I did not work on the lesson editor.
>
> I tried to make as few changes to your code as possible so that it 
> should still work w/in JBuilder. I did the work in
>
> In the meantime, I am attaching the jar file and the jnlp file. If you 
> could put them into the same directory and edit the "codebase" in the 
> jnlp to agree with that location, you can then test the change from a 
> browser.
>
> Let me know how it goes.
>
> DM
>
> 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.
>>



More information about the jsword-devel mailing list