The base directory is defined here to mean the top-level parent directory for the application's work area on the user's disk. It would normally and preferably, but not necessarily, be the directory from which the application is launched. For convenience, define the absolute location of the base directory as parent/base.
The base directory name is UrvbaseJ and renaming it by the user is not supported. Define root as the absolute root directory for the application's working area on disk or other storage medium. For Windows, root would normally be C:\ (C:/ also seems to be always accepted when programming with Java). For Unix and Linux, root would normally be /. The default parent directory for Windows is:
C:\ProgramData\KFFraser Software\Java Unravel\
and is:
/ProgramData/KFFraser Software/Java Unravel/
for Unix and Linux. For earlier versions of the Unravel software, the default parent directory for Windows was:
C:\Program Files\KFFraser Software\Java Unravel
which worked fine for XP. Using that default parent directory for later versions of Windows resulted in a Web Start fatal null pointer exception (the Unravel program was not allowed to create child folders with "Program Files" as parent). If the ProgramData folder does not exist, it will be created.
When the Unravel program is run from the urvall.jar file via Web Start, this file is stored in the Java cache and renamed to something like "4c3b82af-1e7c0261" for Java Runtime Environment jre1.7+. Previous versions of the jre behaved differently, so there is no guarantee that cache behaviour will not change in future versions of the jre. The following process occurs during initialisation via urvall.jar (including from Web Start):
Ref | Condition | Status for Yes | Status for No |
1 | Is base the current directory ? | Current directory will be used as base directory. | Go to 2. |
2 | Does parent/base directory exist ? | The parent/base path will be used as the absolute path for the base directory. | Go to 3. |
3 | Present user with the option to accept the default absolute path for the base directory. Does user accept ? | Create the default base directory base. | Go to 4. |
4 | Allow user to search for or specify the path to the base directory. Does user specify a valid path. ? | Accept the defined path to the base directory. | Unacceptable - program will loop until default path is accepted or valid alternative path is specified by the user. |
For details on sub-directories searched for and, if applicable, created with base as parent, and for files stored in base or its sub-directories refer to Running from Java archive and Running from Web Start. For further details on the parents:
KFFraser Software/Java Unravel
of the base directory refer to Parent directory.