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.
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.