The Initialization File in Windows

Most software products that run under Windows use an .ini file to set environment variabltes. This topic describes the initialization file for setting up the environment in Windows.

Related Topics
Matrix.ini Defaults
The Initialization File in Unix
Setting Personal Preferences

The Initialization File

In Windows environments, ENOVIA Studio Modeling Platform applications read the enovia.ini file upon startup to determine the location of the database and to set up the program environment. During ENOVIA Studio Modeling Platform installation on Windows, the enovia.ini file is placed in ENOVIA_INSTALL\studio\win_b64\code\bin\. The applications then access the enovia.ini file as needed during the session. For example, the pixmappath setting is read when the ENOVIA Studio Modeling Platform needs to display a .gif image for the first time. When preferences or the size and location of a window are altered, the changes are written to the enovia.ini file, and it is saved when the session is closed.

A typical Windows version of the enovia.ini file is as follows:

[MATRIX]

MATRIXHOME=C:\enoviaVERSION\studio\

MATRIXINSTALL=C:\enoviaVERSION\studio\

MX_FLASH_PATH=C:\enoviaVERSION\mxcache

PIXMAPPATH=C:\enoviaVERSION\studio\win_b64\pixmaps\app\

COLORPATH=C:\enoviaVERSION\studio\win_b64\code\lib

MATRIXPATH=C:\enoviaVERSION\studio\win_b64\code\bin

MX_TCL_SHLIB=

TCL_LIBRARY=C:\enoviaVERSION\studio\win_b64\tcl85\lib\tcl8.5

TK_LIBRARY=C:\enoviaVERSION\studio\win_b64\tcl85\lib\tk8.5

TMPDIR=C:\DOCUME~1\xxx\LOCALS~1\Temp

MX_DEFAULT_KERNEL=

MX_JVM_DIR=C:\Program Files\Java\jdkVERSION\jre\bin\client\

MX_JDK_DIR=C:\Program Files\Java\jdkVERSION\

MX_JAVAC=C:\Program Files\Java\jdkVERSION\bin\javac.exe

MX_CLASSPATH=C:\Program Files\Java\jdkVERSION\lib;C:\
enoviaVERSION\studio\managed\properties;C:\enoviaVERSION\studio\wi
n_b64\docs\javacommon;C:\enoviaVERSION\studio\win_b64\docs\javaser
ver;C:\enoviaVERSION\studio\win_b64\docs\custom;

LANG=C

Live Collaboration Server Environment

When installing the ENOVIA Live Collaboration Server to provide access to ENOVIA Live Collaboration via ENOVIA Matrix Web Navigator or other Web-based applications, it must be set up as any other ENOVIA Live Collaboration client. This means that it must not only have a connection file (MATRIX-R file) and a database alias established, but it also requires an initialization file on Windows. A separate file, also called enovia.ini is created and installed when the ENOVIA Live Collaboration Server is installed on Windows platforms. During ENOVIA Live Collaboration Server installation, the enovia.ini file is placed in SERVER_INSTALL\win_b64\code\bin\ (previously C:\WINDOWS\). The server’s enovia.ini file can (and should) contain most of the settings that have been added to the enovia.ini file for your ENOVIA Studio Modeling Platform clients.

For more information, see ENOVIA Live Collaboration Server Environment Settings.

Setting the Location of the enovia.ini File on Windows

In Windows environments, it is highly recommended that the enovia.ini file (previously matrix.ini) for the ENOVIA Studio Modeling Platform and the enovia.ini file (previously ematrix.ini) for the ENOVIA Live Collaboration Server not be located in the Windows installation directory or C:\WINDOWS. You can choose to put these files in any directory, however enhanced Windows security does not permit applications to modify files in this directory. Also, it is important to note that the enovia.ini file installed with the ENOVIA Studio Modeling Platform and the enovia.ini file installed with ENOVIA Live Collaboration Server are not interchangeable and should not be placed in the same directory.

An enovia.ini file directory can be set in any of the following ways:


  • Appending the -inidir option to the command lines that run the ENOVIA Studio Modeling Platform applications. For example:
    mql.exe -inidir c:\enovia

    For details on appending options, see Command Line Options.

  • When installing ENOVIA Live Collaboration Server as a Windows service, the directory can be set with the RMIService.exe config option. For example:
    RMIService.exe -config "ENOVIA Live Collaboration Server"
    -inidir c:\enovia
    

    For details, seeReconfiguring the ENOVIA Live Collaboration Server Windows Service in Live Collaboration - Server Installation Help.

  • Setting the Windows environment variable, ENOVIAINIDIR. For details, see "Typical Environment Variables".
  • Setting the enovia.inidir variable in the web.xml file. For details, see enovia.ini Directory Parameter.
  • When developing a custom ENOVIA Studio Customization Toolkit application, you can call the static method, MatrixSession.etIniDirPath(PathToIni), to set the directory. This must be done before any other ENOVIA Studio Customization Toolkit call is made.
  • When running a custom ENOVIA Studio Customization Toolkit application based on eMatrixServletRMI or when using any Java based application server (e.g. Tomcat), you can set the directory using the JAVA_OPTS: “-Denovia.inidir=PathToIniDir.” For example:
    java.exe -Denovia.inidir=c:\enovia myApp
    

    The JAVA_OPTS must also be applied to the matrix.util.ComputedClassPath. If you are running the RMI service in a command window (rmireg.bat), the JAVA_OPTS must be applied to rmid.exe using “-C-Denovia.inidir=PathToIniDir.”

Since copies of the enovia.ini files can exist in more than one location on the same machine, the system uses a lookup order to determine which files to use. This lookup order is used to determine which file to use. It is not used to determine which values in that file to use.

The following table lists the lookup order. The system attempts to use the directory defined by the first method on the list. If no directory is defined, it moves on to the next method down to the default directory, C:\WINDOWS. If the directory defined by a method does not exist, the system will NOT move to the next method.

ENOVIA Studio Modeling Platform Applications Web Server ENOVIA Live Collaboration Server ENOVIA Studio Customization Toolkit Application
      Set directly to MatrixSession
-inidir Argument. Java Options For Windows Service: RMIService.exe config (-inidir). For Rmireg.bat: Java Options enovia.inidir Java Options enovia.inidir.
  web.xml file    
Environment Variable Environment Variable Environment Variable Environment Variable
Executable Location eMatrix.jni.dll or eMatrix.net.dll location eMatrix.jni.dll location eMatrix.jni.dll or eMatrix.net.dll location
C:\WINDOWS C:\WINDOWS C:\WINDOWS C:\WINDOWS