[jsword-devel] webstart

Troy A. Griffitts scribe at crosswire.org
Fri Sep 3 13:55:51 MST 2004


Hey guys.  Thanks for all the comments and willingness to help!

Don, thanks for the props.  Much appreciated.

DM and others, yes, Flashcards was mostly done in JBuilder (JBuilderX 
Personal, I think).  Nice thing about jbuilder gui builder is that it only 
writes Java code for you, not any serialized files or proprietary 
mechanisms.  It's actually pretty cool; you can edit the generated code 
and return to the gui builder and see your changes.  Their catch phrase 
is: 2-Way Tools.  You should be able to build the source from standard 
javac, without jbuilder.

designers are activated by doubleclicking the appropriate control (JFrame, 
JMenu, etc.) in the control tree, and like Joe said, when one of these is 
open in an editor panel, you should get a tab at the bottom to switch from 
source view to designer view.  It helps me immensely with things like 
GridBagLayout, and other GUI components where I can only guess the 
recommended way of doing things.  Even when I'm not doing a project in 
JBuilder, I've often inserted a control in a dummy frame using it, and 
copied the code :)

Joe, I think jbuilder makes all packages available found in source 
.java files under: 
ProjectName/src

You can specify in the project all src search path directories.

If you need to include a tree of source from another project, you should 
be able to add an additional Source path to your current project.

I like the VI plugin best.

Enough about my endorsement of JBuilder :)

The jar idea is kindof cool, and I like the fact that we can let users 
created new lessons with the editor, and they will be found, as well as 
the lessons found in our lesson.jar that we ship.  That's really cool.  In 
fact, since we started the svn project, we've moved the lessons into 
subdirectories based on the Greek textbook from which they were organized. 
So it would be really cool to have a Black.jar, Mounce.jar, etc.

I was worried about the setup tab getting too large as we continues to add 
new lessons.  Maybe we could have a dropdown list at the top for the 
student to choose the active resource bundle (of course, more aptly named 
for the end user)

 	-Troy.


PS.  That code is a pretty quick hack.  My apologies for it not being 
cleaner.  It was speedily written out of utility to help me pass a 
cumulative vocab test last semester.  The editor components were written 
for the Hebrew Codex Leningradensis Project (Project eL from SBL and 
Westminster Hebrew Institute) a few years back.

The download stats for Flashcards is suprising.  I think we were averaging 
about 25 downloads a day or something for a few months.  Haven't looked 
recently.

Thanks again for your help.  Excited about seeing anything further we 
might produce from this!

 	-Troy.



On Fri, 3 Sep 2004, Joe Walker wrote:

> I seem to remember a tab at the bottom of the source window that would
> flip you to gui mode.
>
>
> ----- Original Message -----
> From: DM Smith <dmsmith555 at yahoo.com>
> Date: Fri, 03 Sep 2004 15:53:57 -0400
> Subject: Re: [jsword-devel] webstart
> To: Joe Walker <joseph.walker at gmail.com>, Java SWORD Developers
> Mailing List <jsword-devel at crosswire.org>
>
> Since the project was already defined, I just opened the jpx file and
> it did the rest. So I don't know about the ugliness.
>
> The reason I guessed that it was done in a gui builder was the jbInit
> and the xxx_actionPerformed(ActionEvent e) methods.
>
> I still have not figured out how to open it in a GUI bldr.
>
>
>
> Joe Walker wrote:
>
> Unless things have changed recently the annoying thing about JB
> Personal is that it assumes that home users don't have many Java files
> to edit, so you have to add each and every .java file to your project
> individually! There was a shortcut where in the file add dialog you
> could open the tree and add lots of files at the same time. You can
> tell if JBuilder was used to edit GUI files because it generates
> jbInit() methods. Joe. On Fri, 03 Sep 2004 15:05:16 -0400, DM Smith
> <dmsmith555 at yahoo.com> wrote:
> 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
> _______________________________________________ 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
> _______________________________________________
> 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