Question

I'm trying to make an AUTO-UPDATING java application. What it's suppose to do is when initiated, it'll check for a jar file online, and if the jar file is named differently, it'll download it, and delete the current jar being ran. What would I have to do for this to work? I'm not sure what methods to use or what libraries I may need.

Était-ce utile?

La solution

Consider using ClassLoader mechanism, there is a way to retrieve classes for resources on the fly. this will work with the most update class resources. First download jar file and then try to load using ClassLoader in the version of the class is up to date than yours.

The Java Classloader is a part of the Java Runtime Environment that dynamically loads Java classes into the Java Virtual Machine. Usually classes are only loaded on demand

Read this to know more about ClassLoaders

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top