X

An Oracle blog about the Java Tutorials

Changing the java.ext.dirs Property

Guest Author
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 the ext 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

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
Oracle

Integrated Cloud Applications & Platform Services