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?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.