Hi, I’m a new user of Julia and I’m a bit confused something.
What’s the difference between launching julia in a terminal (with the command julia) and launching it by executing a random file ?
Hi, I’m a new user of Julia and I’m a bit confused something.
What’s the difference between launching julia in a terminal (with the command julia) and launching it by executing a random file ?
Could you clarify what “Julialauncher” is or how you launch Julia by executing a random file?
In my windows setup Notepad.exe launches when I double click a file. I assume OP has his setup to launch Julia with a double click.
I am not so sure what you try to do, but I would suggest:
I tell my students to work like this for a week. If they are comfortable with using the command line and the Julia REPL, then they might want to install VSCode. VSCode is more powerful, but also requires more time for learning how to use it. If you have VSCode installed you can also use a Bash terminal from within VSCode.
See also Working with Julia projects | Julia programming notes
First thanks for the replies
By julialauncher, I mean this terminal :
It appears when I’m using the julia command in the cmd.
By executing a random file, I mean executing a Julia file without any REPL created.
By the way, I’m using vscode.
For me, what VSCode is doing here is not transparent. I would just use Bash and start Julia from the Bash shell. Then you can also start Julia with any options you might need, like number of threads or --project
or whatever. To see all available options run:
julia --help
If you have gitforwindows installed the option to launch a Bash terminal should also appear in VSCode.
Hi Owen,
From my understanding, the VSCode REPL should behave similarly to the REPL launched from command line, but will automatically enable some convenience features:
It enables things like “Send current line or selection to REPL”, so you can place your cursor on a line of code and hit ctrl+enter to run that line of code in the REPL.
If you are using Julia environments, VSCode will detect your environments and launch Julia in them, and you can pick environments in the bottom left:
If you are using e.g. Plots.jl or CairoMakie.jl, plots will show up in the plot pane:
You can look at your workspace and display vectors/matrices by clicking on them:
If you launch Julia from command line, you can gain these features back by running “Julia: Connect external REPL” from the VSCode command palette (ctrl+shift+p) and pasting the code into your Julia session
The short version of what I’m writing below is that I think you can ignore this entire question of “What is julialauncher
?” as a user.
Here is the backstory: When you install Julia these days it uses Juliaup. Juliaup ships with a very small binary called julialauncher
, and then it puts a julia
command onto the PATH
that is essentially just an alias for julialauncher
. On Windows it is doing that via an execution aliase, on Mac/Linux via a symbolic link.
When you type julia
in a terminal or somewhere else, what really launches is julialauncher
. That binary then figures out which Julia version you actually want to run, depending on your default Juliaup channel etc. On Mac/Linux it then replaces the julialauncher
process with the julia
binary from the version you want to launch, on Windows it launches the julia
binary you want as a child process. So julialauncher
serves the role of the Julia version multiplexer.