findJulia: Find a Julia Executable

Description Usage Arguments Value On Mac OS X

Description

This function looks for an executable Julia application in the local operating system. The location can be prespecified by setting environment variable JULIA_BIN; otherwise, the function looks in various conventional locations and if that doesn't work, runs a shell command to look for julia.

Usage

1
findJulia(test = FALSE)

Arguments

test

Should the function test for the existence of the application. Default FALSE. Calling with TRUE is useful to bullet-proof examples or tests for the absence of Julia. If the test search succeeds, the location is saved in environment variable JULIA_BIN.

Value

The location as a character string, unless test is TRUE, in which case success or failure is returned, and the location found (or the empty string) is saved as the environment variable. Note that in this case, FALSE is returned if the Julia package JSON has not been added.

If test is FALSE, failure to find a Julia in the current system is an error.

On Mac OS X

Installing Julia in the usual way does not put the command line version in a standard location, but instead in a folder under /Applications. Assuming one wants to have Julia available from the command line, creating a symbolic link to it in /usr/local/bin is a standard approach. If the current version of Julia is 0.6:

sudo ln -s /Applications/Julia-0.6.app/Contents/Resources/julia/bin/julia /usr/local/bin/julia

If for some reason you did not want this to be available, set the shell variable JULIA_BIN to the first file in the command, the one in /Applications.


johnmchambers/XRJulia documentation built on May 19, 2019, 5:16 p.m.