Re: how load properites files to applet without signed...

Discussion in 'Java' started by markspace, Jul 6, 2009.

  1. markspace

    markspace Guest

    Rafal (sxat) wrote:
    > Hi
    >
    > this work as application, but I am change it to Japplet and i have small
    > problem with it::
    >
    > defaultProps = new Properties();
    > defaultProps.load(ClassLoader.getSystemResourceAsStream(resourceName));



    I'm not sure, but try

    getClass().getSystemResourceAsStream(resourceName)

    Instead of the ClassLoader version. I wonder if the Applet context
    shares system classes between all applets, and if that might preclude
    loading resources from individual applet jar files.

    If in a static context, use

    Your_Class.class.getSystemResourceAsStream(resourceName)


    Let us know if this succeeds.
    markspace, Jul 6, 2009
    #1
    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. kem1
    Replies:
    1
    Views:
    448
    Manish Hatwalne
    Jun 7, 2004
  2. Murph
    Replies:
    5
    Views:
    532
    Andrew Thompson
    Jul 19, 2005
  3. Hansi
    Replies:
    10
    Views:
    4,025
    Mickey Segal
    Feb 15, 2007
  4. kyrpa83
    Replies:
    1
    Views:
    621
    kyrpa83
    Oct 17, 2007
  5. Rob1bureau
    Replies:
    1
    Views:
    804
    joris
    Feb 27, 2010
Loading...

Share This Page