System/CoreInstallation

From J Wiki
Jump to navigation Jump to search

Installing the Core J System

The J core includes the J engine and two front-ends to it, Jconsole and JHS.

Download and run the appropriate file from downloads page.

Some files are zips or tars that can be unzipped and moved anywhere on your machine. Others are installers that create a default installation.

In the discussion below the fully qualified location of the J install folder will be referred to as ~install.

Admin privilege is not required for a standard install or for web updates.

Doing the install in a protected folder path such as "Program Files..." or /usr/... requires admin privilege and will require admin privilege for web updates. Installing in other than HOME can be a nuisance and has no compelling benefit with the possible exception of an install for Multiple Users.

What is installed

JE (J Engine) is a shared library that executes J sentences and is the system core. It is in the ~install/bin directory. JE is j.dll in Windows, libj.so in Linux, and libj.dylib in Mac.

Jconsole is a console front-end to J. It is ~install/bin/jconsole.exe in Windows and jconsole in Linux and Mac.

A browser can also be a front-end to J, if you start a JHS server and point the browser to the URL of the server.

Folder Summary

J:

  jinstall: j804          or j64-804
  juser:    j804-user     or j64-user-804

home:

  Vista or later: \Users\name
  XP:             \Documents and Settings\name
  Linux:          /home/name
  Mac:            /Users/name

system:

  J32 on Win 32: C:\Program Files
  J64 on Win 64: C:\Program Files
  J32 on Win 64: C:\Program Files (x86)
  Unix:          /usr/...

standard install:

  home/jinstall
  home/juser

system install:

  system/jinstall
  home/juser

custom install:

  [...]/jinstall
  home/juser

custom install with profilex.ijs:

  [...]/jinstall
  [???]

OS-specific Information

Windows

You will be prompted for a location to install under. Note that the folder you select is not the folder that J will be installed in. The installation will create a new folder in the location you specify, and install J in this new folder. The name of the J subfolder is j804 for 32 bit, or j64-804 for 64 bit systems. The default installation location is under HOME.

If using the installer, this creates J folder j804 and Program Group j804 (j64-804 for Windows64).

Yellow J icon interrupts a running J program.

Gray J icon runs Jconsole (Ctrl+D exits).

Windows XP: HOME is "\Documents and Settings\username".

Linux and Raspberry Pi

Unzip and move to the target directory, usually ~/j804 or ~/j64-804.

Run Jconsole:

...> ~/j804/jconsole.sh

To start Jconsole from any directory, create a symbolic link to the binary in a folder in PATH. For example,

...$ ln -s ~/j804/bin/jconsole jc
...$ sudo mv jc /usr/bin/jc

libedit

Jconsole now requires libedit.so.2.

RHEL 6 (and its derivatives) include libedit.so.0.0.27. Jconsole will run on this distribution if you make a symbolic link from libedit.so.0.0.27 to libedit.so.2 (requires root access).

Suse Linux 12.1 requires the following symbolic links (requires root access):

...$ ln -s /lib/libncurses.so.5.8 libtinfo.so.5

...$ ln -s libedit.so.0.0.35 libedit.so.2

Unix hardlinks to J front-ends are not supported and symlinks must have an absolute path.

Mac

Standard install is to use Finder to copy j804 folder from the zip to your home folder.

Copy does a complete replace of an existing J folder and you need extra steps if there are files you want to protect or carry forward.

  • Green jqt icon runs JQt (if installed)
  • Grey jcon icon runs Jconsole
  • Red jhs icon runs the JHS server
  • Yellow jbrk icon interrupts a running J program.

To start Jconsole from any directory, create a symbolic link to the binary in a folder in PATH. For example,

...$ ln -s ~/j64-804/bin/jconsole jc
...$ sudo mv jc /usr/bin/jc

An option is to copy the j804 folder to Applications. This requires admin privilege for the install and for subsequent web updates. An Applications install can be used by other users.

Another option, for casual use, is to just run J from the mounted disk image.

An additional step is required to run Jconsole on OSX 10.6.8 (Snow Leopard). Jconsole now requires libedit.3.dylib. OSX 10.6.8 doesn't have this dylib. Instead it has libedit.2.dylib . Make a symbolic link from libedit.2.dylib to libedit.3.dylib to make jcons "see" the dylib it expects to see.

...$ sudo ln -s /usr/lib/libedit.2.dylib /usr/lib/libedit.3.dylib

Jconsole will now run on this version of OSX.

You should probably run jconsole inside j64-804's bin folder, and execute:

   install'all'

If you can complete this step, it will ensure that everything is working properly.

Note that your first use of an icon after install may require you to authorize execution of the code. Also, your first attempt to use JHS after an install may result in an apparent failure with a spurious error message - but if jconsole works, JHS should launch properly on a second attempt.

Multiple Users

Multiple users can share a single J install. Different users automatically get their own user and temp folders in their HOME folder.You can share a standard install with the J folder in the HOME directory of the user who is primarily responsible for J and updates and maintenance.

Alternatively you can do the install (or move an existing install) to a folder you feel is more appropriate. If you move a Windows install you have to manually edit the jsoftware-j804 icon properties to reference the new location.

You will want to provide users a convenient way to run J and this varies across platforms.

Windows

To allow all users to see the jsoftware-j804 Program Group, copy it from your HOME Programs folder to the public Programs folder:

1. right click Start button and click Open 1. right click jsoftware-j804 and click copy 1. right click Start button and click Open All Users 1. right click Programs folder and click paste

Linux

Create desktop launch icons and symlinks as appropriate.

Mac

If you put j804 in Applications, the J icons are already there in the j804 folder. If J is somewhere else you can create alias links for the J icons in Applications as follows:

1. in J folder press ctrl, click red J icon, click Make Alias 1. drag j804 alias to Applications 1. rename alias to just be j804 1. repeat steps for yellow J icon if desired

Create symlinks as appropriate.

Customized User Folder

The normal folder for user and temp files is HOME j804-user (or j64-804-user). Override this by creating profilex.ijs in your J bin folder.

bin\profilex_template.ijs is a template of what you want in profilex.ijs for the override. Study profilex_template.ijs before making your profilex.ijs file. Backup and be careful as errors may prevent J from starting properly.

USB Memory Stick

You can copy a J folder to a USB memory stick for a complete and portable J system. If you want the J user folders to be on the memory stick you need to create a profilex.ijs file in the memory stick J bin folder. See Customized User Folder for more information. You will want to edit profilex.ijs to have user in the install folder.

If you don't put profilex.ijs in the J folder on the memory stick, the J system will use HOME for the user folder.

Uninstall

Uninstall a J system by deleting the install folder, user folder(s), launch commands, icons, and shortcuts.

If you aren't sure where the J folders are, run J to get the information:

   jpath'~install'
...
   jpath'~user'
...

Don't delete the user folder if you want to keep those files for a new J install.

A multi-user install will have user folders in each users home folder.

Windows

Delete the J program group by clicking Start|All Programs then right clicking the J program group and selecting delete.

If you registered J as a COM server you can unregister it by running

....> regsvr32 /u [path to J install folder]\j.dll