Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#5 How to distribute dictionary using JNLP

open
None
5
2005-01-27
2005-01-27
sffan
No

Hi,
I am using Jazzy API and english.0 file in my
application. I get the dictionary file as a resource
using,

private static createDictionary()
{
Application instance = new Application();
java.net.URI engUri =
instance.getClass().getResource("/dict/english.0").toURI();
File englishDictFile = new File(engUri);
SpellDictionary engDictionary = new
SpellDictionaryHashMap(englishDictFile);
JTextComponentSpellChecker spellCheckerComp = new
JTextComponentSpellChecker(engDictionary, "Spell Check");
}

This workd fine on my desktop. When I create the jar
file I include the dict folder which contains the dict
file. I implement the application in Java Web Start
using JNLP file. When I run the jnlp file, it throws,
NullPointerException, URI is not hierarchical.
Can sombody tell me why it is.

If I want to specify the dict file as a resource in my
jnlp file, how do I do that. Thank you.

sffan

Discussion

  • sffan
    sffan
    2005-01-27

    • assigned_to: nobody --> wobban