The Java Tutorials' Weblog
Changing the java.ext.dirs Property
We received a question on the java tutorials alias that isn't covered in the Extension Mechanism tutorial. We were asked if there is a way to set theext path using an environment variable. Something along the lines of:
export JAVA_EXT_PATH="/opt/MyProduct/java-ext"
No, there is no environment variable, but there is the java.ext.dirs system property. For example:
java -Djava.ext.dirs=/foo/bar/baz:/bleem/grumpf MyApp
See the Extension
Mechanism Architecture spec
and search for "java.ext.dirs" and you can read a bit more. In particular, note that the path separator (':' above) is platform dependent, so it would be a semi colon on Windows.
Thanks to Maxim Vexler for asking the question and especially to Dave Bristor in software for answering it. :-)
-- Sharon Zakhour
Posted at 02:45PM Sep 02, 2008 by The Java Tutorial Team | Comments[0]
Comments:
Tuesday Sep 02, 2008