Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting java.system.class.loader programmatically [duplicate]

At the moment I'm using bat file to launch my jar and set the java.system.class.loader. Is it possible to do this programmatically to get rid of the bat file?

like image 689
perak Avatar asked Jul 04 '12 18:07

perak


1 Answers

You can't, because the system class loader is used before the first line of your program is executed.

You may use a different class loader for some classes, but you can't change the system class loader from your running program.

like image 131
Denys Séguret Avatar answered Oct 26 '22 16:10

Denys Séguret