After puzzling through startup for the umpteenth time I decided to try to write it all down in JfC for reference. The text follows. I am hoping that some people who are familiar with it, particularly with non-Windows packages, will correct any errors.
This file has very long lines as I paste it in here; I hope mail readers will fold the lines legibly. Henry Rich Startup and Configuration The Edit|Configure menu allows you to change the interpreter's settings. Look through the tabs to see what is available. Note especially the Folders tab, which lets you specify the folders Project Manager and Find In Files will use to organize your work. In addition to the configuration variables, you can have startup commands executed whenever J starts, or you can specify a script in the command line that will run after J has been initialized. The startup sequence is described in detail here. If you just want to run some startup commands, jump to section 4.4 which describes the user startup file. 1. The command line is parsed into words. The words are assigned to the variable ARGV_z_. The first word is the name of the J executable. The subsequent words, the parameters, tell J what to do. The first parameter that is not a switch is the name of the command script which is the J script you want to execute. 2. If the first parameter is the -jijx switch, the normal J IDE window, where you type commands and see them executed, will not be created. You must have a fully standalone application. Except for creating the IDE window, the J startup sequence will be followed as described below, and the -jprofile switch will be honored. 3. If the command line contains the -jprofile switch, you are taking full control of J's startup. Your command script will be executed instead of J's normal start sequence. Make sure you get it right! If the command script is omitted, J will run ~system\extras\util\minijx.ijs which will give you something to start with. 4. If you don't specify the -jprofile switch, you get J's normal startup sequence which winds up by executing the command script. The normal startup sequence is contained in the script ~bin\profile.ijs, which goes through the following steps: 4.1. The variable SYSTEMFOLDERS_j_ is created, containing the paths J uses to get to your home directory, the system, etc. You can look at this variable after J has started to see what folders are defined. If you want to change these directories, you do so by creating the script ~bin\profilex.ijs. Use ~bin\profilex_template.ijs as the template for creating your custom file. 4.2. Normal startup continues by running ~system\extras\util\boot.ijs. This file begins by creating any missing directories in SYSTEMFOLDERS; then it loads the J system files sysenv.ijs, stdlib.ijs, colib.ijs, and break.ijs from ~system\main. 4.3. Next, if the J executable was Jconsole, the console window is created and the console startup file ~config/startup_console.ijs is executed. Otherwise, the J IDE is loaded and the configuration files are executed (note that the configuration files are not run for Jconsole). The configuration files are: (1) the system configuration file ~system\extras\config\stdcfg.ijs, (2) the user configuration file ~config\config.ijs, (3) the addons configuration file ~addons\config\config.ijs. These files are applied in order, with a later file's setting overriding any one from an earlier file. The user configuration file is the one that holds the settings from the Edit|Configure menu. 4.4. After configuration, the user startup file is executed. This file is named in the Edit|Configure|Startup menu, where a default is given that you may override. This file is where you put the definitions that you want executed every time J starts. The file is executed in the base locale. 4.5. Finally, the command script is executed. If the switch -js is given as the name of the command script, the words of ARGV_z_ following the -js are taken to be lines of J code, and they are put into the verb ARGVVERB_z_ which is then executed, instead of the command script, in the base locale. Configuration Globals In addition to the configuration variables set by the Edit|Configure menu, other globals control aspects of execution. You can set CONFIRM_CLOSE_j_ to 1 to cause J to ask Are you Sure? when you close the .ijx window. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
