| Introduction | Automating |
| Visibility | Downsides |
| Applets | Learning More |
| Mac OS X | Links |
java.exe -Djava.ext.dirs=C:\mylibs mypackage.MyClass
As of Java version 1.6, you can have as many ext dirs as you want, and you can put them wherever you please. You must tell Java where to look for them by setting the java system property java.ext.dirs.
To find out which ext dir java.exe is loading from, use the -verbose:class command line option to dump out the source of each class as it is loaded.
| Ext Dir Visibility | |||
|---|---|---|---|
| JRE ext | Browser ext | JDK (Java Development Kit) ext | Purpose |
| Compiling (finding method signatures to generate correct code to call methods). | |||
| running applications from local hard disk. | |||
| running Applets from local hard disk. | |||
| running Applets from the web. | |||
| running Java Web Start applications from local hard disk. | |||
| running Java Web Start applications from the web. | |||
System.getProperty( "java.ext.dirs" );which you can view by running wassup as an application or Applet. Then put the
java.ext.dirs = C:\Program Files\Java\jre1.6.0_18\lib\extAny jars jars in the ext directory will automatically be found without putting them on the classpath.
Oddly, other browsers, Flock, Avant, Safari, SeaMonkey and Firefox, don’t seem to have an java.ext.dirs property. If you can shed any light on this mystery, please let me know.
There are at least two ext directories:
Sooner or later you will have to reinstall the JDK/JRE and you will lose your ext directories. You can quickly rebuild them if you maintain a bat file like this and run it after every JRE/JDK install. Adjust the file to account for where your ext dirs are and where the jars are you need.
|
|
You can get the freshest copy of this page from: | or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror) |
| http://mindprod.com/jgloss/ext.html | J:\mindprod\jgloss\ext.html | |
![]() | Please email your feedback for publication,
letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear wording,
broken/redirected link reports, suggestions to improve this page or comments to
Roedy Green :
| |
| Canadian Mind Products | ||
| mindprod.com IP:[65.110.21.43] | ||
| view Blog | Your face IP:[38.107.179.213] | |
| Feedback | You are visitor number 25,156. | |