Endorsed directories - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

jarome
Posts: 7
Joined: Mon Nov 07, 2005 10:38 pm

Endorsed directories

I am using Advanced Installer 3.9.

My Java project needs to put the JAXB 2.1 jars into an endorsed directory so they do not interfere with the JAXB2.0 jars included in Java 1.6. The jars are in the lib directory in my project (APPDIR/lib).

But I cannot figure out how to do this. Setting the jvm parameters to:
-Djava.endorsed.dirs=APPDIR/lib
does not work. a priori, I do not know where the user will install this program.

Thanks,
Jim
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

We have a How'To for installing a Java Extension, please take a look:
http://www.advancedinstaller.com/user-g ... a-ext.html

You can try to use a similar approach in order to accomplish what you need, but I'm not sure if it will work.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jarome
Posts: 7
Joined: Mon Nov 07, 2005 10:38 pm

That is what I need to do, but how do I specify [MyFolder_DIR]?

Can I use APPDIR/lib?

I don't know where the user will install my app.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

Note that [MyFolder_DIR] is an example. Here are the steps to accomplish what you need:
- you create the folder "Extensions" in the "Application Folder" directory in the "Files and Folders" page
- in the "Java Products" page you select your product
- in the "Virtual Machine" tab you press the "..." button in the "JVM Parameters" field
- in the "Edit JVM Parameters" dialog in the "System Properties" section you press the "Add" button and select "Extension Directories"
- in the "Value" field you right-click and select "Folder..."
- in the "Choose Installation Folder" dialog you select the folder "Extensions" under "Application Folder"
- this folder will be added as [Extensions_DIR]
- the "Value" field should look like this:

Code: Select all

%AI_JVM_HOME%\lib\ext;[Extensions_DIR]
Note that this folder will always be under "Application Folder", therefore it doesn't matter where the user installs the application.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jarome
Posts: 7
Joined: Mon Nov 07, 2005 10:38 pm

My version only allows me to add name/value pairs to the "Edit JVM Parameters" dialog. I have a New button, but no Add
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

The system property for the extension can also be added by using the "New..." button. You can define the system property like this:

Code: Select all

Name: java.ext.dirs
Value: %AI_JVM_HOME%\lib\ext;[Extensions_DIR]
Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jarome
Posts: 7
Joined: Mon Nov 07, 2005 10:38 pm

One more question

Doesn't it have to be java.endorsed.dirs to override the defaults used in Java?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

Yes, you can use java.endorsed.dirs instead of java.ext.dirs. Note that in this case you should use this value:

Code: Select all

%AI_JVM_HOME%\lib;[Extensions_DIR]
Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jarome
Posts: 7
Joined: Mon Nov 07, 2005 10:38 pm

cosmin wrote:Hi,

Yes, you can use java.endorsed.dirs instead of java.ext.dirs. Note that in this case you should use this value:

Code: Select all

%AI_JVM_HOME%\lib;[Extensions_DIR]
Regards,
Cosmin
That worked perfectly. Thank you.

Return to “Common Problems”