How to open networks more easily

This trick will allow you to open OpenMarkov's networks by double-clicking on them. We explain it for Windows; the procedure for other operating systems is similar.

  1. When downloading OpenMarkov's executable file, save it always as OpenMarkov.jar and remember the folder where you saved it; for example, c:\OpenMarkov.
  2. Create a text document and rename it as OpenMarkov.bat.
  3. Create a text file called OpenMarkov.bat, containing one line like this:
    java -jar c:\OpenMarkov\OpenMarkov.jar %*
    The path to the file OpenMarkov.jar may be different if you have downloaded it on another folder.
  4. If it doesn't work, the problem may be that Windows cannot find Java. In this case, go to Control Panel > System > Advanced options > Environment variables, and at the variable Path add the path to Java. For example, in Windows 7 64-bits or in Windows XP add "c:\Program files\Java\jre7\bin". In Windows 7 32-bits add "c:\Program files (x86)\Java\jre7\bin".
  5. Right-click on any file having the extension .pgmx (i.e., a file in format ProbModelXML) and in the contextual menu select "Open with > Choose program...". Choose the file OpenMarkov.bat created in the previous step and check the box "Always use the selected program to open this type of file."
The same method can be used to open with OpenMarkov other types of networks that this tool can read, such as files in Elvira's format (extension .elv).