问题
I gather that Julia used to have a file called juliarc.jl
that let you specify things that you wanted Julia to do upon startup. Some time ago, it lived in ~/.julia/config/startup.jl
, according to this reference. I now have Julia 1.0.0 on a Windows 7 machine, and I have neither the directory ~/.julia/config
nor any files called juliarc.jl
.
What is the modern way to tell Julia to do some tasks on startup?
回答1:
The location of files has changed in Julia 1.0 (ref: https://github.com/JuliaLang/julia/pull/26161)
Now the locations are the following:
- Global Julia startup file:
JULIA_INSTALL_FOLDER\etc\julia\startup.jl
- (whereJULIA_INSTALL_FOLDER
is the place where Julia is installed, for Linux use the same path with forward slashes/
) - Local Julia startup file (please note it might not exist):
%HOMEPATH%\.julia\config\startup.jl
(on Linux use~/.julia/config/startup.jl
)
来源:https://stackoverflow.com/questions/52175314/where-is-juliarc-the-julia-startup-file