Menu

#8 Implement a easy to use ResourceManager class

open
Core (4)
7
2005-06-14
2005-06-14
No

The ResouceManager class should be able to resolve
absolute and relative paths and urls and has to be easy
enough to be used by the Include and JFCMLPanel
features as well as by the users for loading Images and
such.

Discussion

  • Shawn Curry

    Shawn Curry - 2005-06-14

    Logged In: YES
    user_id=1118529

    I reassigned the priorities of tasks you have assigned to
    yourself to indicate my preferences. This is simply my
    vote, do them in whatever order you like. :)

    This ResourceManager should include an interface for
    handling jar files. While it is possible to access
    resources in jars through the ClassLoader, it is very clumsy
    when they are not in the executing jar.

    The problem with using the ClassLoader is that the
    ClassLoader is made for loading classes. The resources
    inside other jars do not become available until the
    ClassLoader actually loads a class from the jar. This leads
    to the implicit requirement that any resource jar must
    contain at least one class file, and that class must be
    referenced from your program.

    It is possible to access resources in a jar directly using a
    JarInputStream, but this requires much more boilerplate code
    compared to using the ClassLoader. The ResourceManager
    would provide this interface. The user would specify a
    relative path to a jar file, and a relative path to the
    resource inside the jar; and the ResourceManager would
    return a File or InputStream.

    The ResourceManager could be a registered variable in
    JFCMLScript and BSF, making it available inside all
    supported scripting languages. Alternatively (or
    additionally), JFCMLScript could provide some URL-like
    syntax for accessing these resources.

     
  • Shawn Curry

    Shawn Curry - 2005-06-14
    • priority: 5 --> 7
     

Log in to post a comment.

MongoDB Logo MongoDB