Situation
I have developed an Eclipse RCP application. This application may be installed on both Windows and Linux systems.
If this application is installed in Administrator mode (Windows) or by a superuser (Linux), the application is typically installed in a write-protected shared install directory.
- On Windows, our product installer is always run in Administrator-mode. The default installation directory is the (write-protected)
C:\Program Files\MyProduct
. - On Linux, the installer can be run by both a normal user and a superuser. For a superuser the default installation directory is the (also write-protected)
/opt/MyProduct
.
This is what Eclipse itself calls a shared install.
Obviously, a normal user running the application does not have rights to modify this directory. Therefore, runtime data such as changed configuration data or auto-updated plug-ins are written to a user-specific private configuration area.
- On Windows this defaults to a subdirectory of
$USERPROFILE\.eclipse\
. - On Linux this also defaults to a subdirectory of
~/.eclipse/
Problem
By default the private directory within .eclipse
has a seemingly random name:
.eclipse/1410846118
If I add an .eclipseproduct
metadata file, the default behaviour changes. The content of the file is described in this forum post:
# FILE:
name=MyProduct
id=com.mycompany.myproduct.gui.product
version=1.8.17
This results in a private directory with the following name:
.eclipse/com.mycompany.myproduct.gui.product_1.8.17_1410846118/
This means although the product ID and version are now used, the same seemingly random number is still present as a suffix.
My question is simple: what is this number and how can I calculate it?
Eclipse seems to be able to calculate it after installation. However, I don't seem to find it in any file of the shared installation using
sudo find /opt/MyProduct -name '*' | xargs grep -e '1410846118'