Back to the old problem that Sun made the world’s first mainstream dynamically linked language and then people want to … dynamically discovre and load classes at link time - but java still doesn’t support this no-brainer.
I’ve met someone doiung the classic “make a new classloader, make a custom “load from file” loader in 10 lines of code, and laod classes from a user-specificed directory”. Now the question is: how the heck to do this in “Sun sanctioned” ways, i.e. so that it will work in webstart?
Off the top of my head, ideas so far are:
-
Make all the downloadable additional classes Extensions. The author then has to manually specify every single one in the webstart JNLP for the app. Off the top of my head … I think they also have to hard-code a description of each into the app, which is incredibly stupid given what this trying to acheive
-
Make all the dl/classes into standalone apps, that “install” themselves by wrting a child of a known Muffin. Main app scans that muffin on startup to find out what additional classes are “installed”. Not sure how it’s going to instantiate them at this point…presumably, they advertise themselves in the muffin with their JNLP URL so that the main app can trigger a webstart extension fetch. However, I’ve never tried doing an extension fetch AFTER the app has started, and given the way sun chose to desgin webstart I’m not entirely sure it’s possible?
-
…other?