2

I want to know if there is a way to load classes and jars on runtime?

Ravisha
  • 3,261
  • 9
  • 39
  • 66

2 Answers2

5

Absolutely - create an appropriate ClassLoader instance, e.g. using URLClassLoader. You can then ask that classloader to load classes etc.

If you can give more information about exactly what you're trying to do, we can possibly help to provide more details or sample code.

Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194
1

Ya you can do it using Custom class loader. And this is what is used for Hot Deployment, That is loading classes at runtime.

GuruKulki
  • 25,776
  • 50
  • 140
  • 201