I understand URLClassLoader does not behave this wayNot sure about that. I would investigate further before committing yourself to any code.
I wonder if you know of any utility or project providing this functionality .JNLP.
- Class loader loads the latest version of the classes, checking timestamp or UUID of downloaded cached local classes against those in server.JNLP.
- Downloading the .jar where the .class is packaged instead of just downloading the .class.URLClassLoader already does that. See the Javadoc. It explicitly says that the jar is downloaded.
Finally I have some questions about network class loading:Compared to what? JAR files aren't particularly large, and they are downloaded once at most in the lifetime of the URLClassLoader. Even if URLClassLoader downloaded individual classes, that would only happen once per class per client JVM.
- Does remote class loading overloads the system serving the classes?
- Is remote URL required to be a public folder? I want tokeep my classes privateI guess you could use an Authenticator for that but you'll get tangled up with other uses of it.
and streaming them through a front servlet.You're worried about performance and you're adding extra processing? Just stick them somewhere on an Apache web server, or in a Tomcat under the path to an existing application. You don't need your own servlet for this, it doesn't add anything.