Run a executable jar file within java program using class loaders?

You can use the class java.net.URLClassLoader. You'd have to instantiate the URLClassLoader passing the URLs (which can be file URLs) of the desired JARs. Then you can use this class loader to load the class with the main method.

The URLClasLoader.loadClass() methods will return you the Class instance representing the loaded class. With that, you can instantiate it by reflecton and further call it. You'll have to directly call the main() method.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions