[jsword-devel] webstart

DM Smith dmsmith555 at yahoo.com
Fri Sep 3 12:05:16 MST 2004


I've figured out that the jpx are JBuilder project files. So I 
downloaded the free Personal version and loaded the project into it.

Is this an appropriate version of JBuilder? So far I am poking around 
trying to figure out how the IDE works and how the app is maintained 
w/in it. (The code is easy to figure out.)

Still wondering if you used a GUI builder. If so, is it a part of 
Personal ver and how do you invoke it?

DM Smith wrote:

> I have dl svn from their website and have checked out the flashcard 
> files.
>
> I also tried subeclipse, but it did not work. It was missing a 
> required dll (libapr.dll, apache portable runtime). They know of the 
> problem and are working on fixing it. So, still no SVN from within 
> Eclipse.
>
> Troy, it looks like you have built the project w/ a gui builder/ide. 
> If so, which one did you use?
>
> 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
>>
>
> _______________________________________________
> jsword-devel mailing list
> jsword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/jsword-devel
>



More information about the jsword-devel mailing list