argreenw
Posts: 5
Joined: Tue May 19, 2015 5:32 pm

Locating Application Directory on Mac OS X Oracle Java App

I successfully created & ran the installer for the Apple Java 1.6 case on Mac OS X. In that case, the current execution directory (from its system property) indicated the directory where the application was executed, so I could point at the installed directories in the application bundle.

But in the case of Oracle Java, I have no way of locating the application bundle. The current directory system property indicates my home directory as the current directory.

Does anyone know a reliable way (when using Oracle Java 1.8) to locate the application bundle used to execute the application?
Irina
Posts: 113
Joined: Mon Apr 27, 2015 11:42 am

Re: Locating Application Directory on Mac OS X Oracle Java A

Hi,

in order for the package to use the Oracle VM you should choose in the "Oracle VM" as "VM provider","Mac OS X" tab of your added Java Product, in the "Settings" section.

In order to set your current directory, go in the "Virtual Machine" tab, and from the JVM Parameters [...] button, go to the "Edit JVM parameters" dialog.
In the "System Properties" section, click Add -> Current Directory and set the parameters

Code: Select all

Name : user.dir 
Value : [APPDIR]
Let me know if this works for you.

Kind regards,
Irina
Ecaterina Irina Grosu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
argreenw
Posts: 5
Joined: Tue May 19, 2015 5:32 pm

Re: Locating Application Directory on Mac OS X Oracle Java A

I found a way to work-around the problem which makes sense, since accessing the installed Help & Tutorials files from within the application bundle is not easily visible to the user.
Irina
Posts: 113
Joined: Mon Apr 27, 2015 11:42 am

Re: Locating Application Directory on Mac OS X Oracle Java A

Hi,

I'm glad you got this working by yourself.
Feel free to post any feedback you think it may be useful for future users facing with the same scenario.

Kind regards,
Irina
Ecaterina Irina Grosu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”