Serialization in Java Web Start

Discussion in 'Java' started by Mike Oder, Jul 25, 2003.

  1. Mike Oder

    Mike Oder Guest

    I'm currently in the process of converting a Java application to Java
    Web Start. However, I have a problem loading some essential files.
    The files were created from a seperate initialization app, and they
    are simply the serialization of a couple key classes in the
    application. I cannot seem to get the application to locate these
    files. It looks for them on the client machine, and throws an
    exception when they cannot be located. I tried putting the files in
    the main JAR file, but the application still is not finding them.
    Does anyone have any ideas as to how I can load these classes? Any
    help would be greatly appreciated, as I am almost entirely out of
    ideas.

    -Mike
     
    Mike Oder, Jul 25, 2003
    #1
    1. Advertising

  2. In article <>,
    Mike Oder <> wrote:
    >I'm currently in the process of converting a Java application to Java
    >Web Start. However, I have a problem loading some essential files.
    >The files were created from a seperate initialization app, and they
    >are simply the serialization of a couple key classes in the
    >application. I cannot seem to get the application to locate these
    >files. It looks for them on the client machine, and throws an
    >exception when they cannot be located. I tried putting the files in
    >the main JAR file, but the application still is not finding them.
    >Does anyone have any ideas as to how I can load these classes? Any
    >help would be greatly appreciated, as I am almost entirely out of
    >ideas.


    If they're inside your JAR file you should using something along the
    lines of
    this.getClass().getClassLoader().getResource("path/of/file/then/filename.ext");
    to load them.

    Don't expect the details to be correct, it's off the top of my head :)

    The "developer" section of sun's Java Web Start pages explains a
    number of JWS stuff with examples, so I'd look there if I were you.

    Cheers
    Bent D
    --
    Bent Dalager - - http://www.pvv.org/~bcd
    powered by emacs
     
    Bent C Dalager, Jul 25, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    8
    Views:
    2,252
    deadsea
    Jan 2, 2005
  2. Replies:
    3
    Views:
    1,035
  3. Dimitri Ognibene
    Replies:
    4
    Views:
    785
    Dimitri Ognibene
    Sep 2, 2006
  4. albert kao
    Replies:
    3
    Views:
    2,025
    Arne Vajhøj
    Feb 2, 2011
  5. Ramunas Urbonas
    Replies:
    1
    Views:
    402
    Dino Chiesa [Microsoft]
    Jul 27, 2004
Loading...

Share This Page