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 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

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Blog about Java technology documentation and news about Java releases.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today