Thursday, June 23, 2011

Add jar folder in classpath

Add a folder containing multiple jar files in the classpath of a java program

java -Djava.ext.dirs=<jarDirectory>

- This works, but watch out, pass the -Djava.ext.dirs= BEFORE -jar – 
- java.ext.dirs will work very different from a normal jar in classpath. It has higher priority and permission which will able to somehow override classes in bootstamp(rt.jar)

No comments:

Post a Comment