Thank you for reading! Recently, I encountered a problem in the project. At first I wanted to use the PHP language to open julia's REPL environment and run a jl file, but it was not successful. You can run the PHP file on the command line, but the browser cannot. For more information, see my previous questions ---- & amp; gt;... Thank you for reading!
Recently, I encountered a problem in the project. At first I wanted to use the PHP language to open julia's REPL environment and run a jl file, but it was not successful. You can run the PHP file on the command line, but the browser cannot. For more information, see my previous question ----> link.
Considering that the REPL environment of julia may be called is different from that of common software, so it cannot be opened smoothly. Now, I want to use another method to change the idea:
We can see that PHP can use MATLAB called by CMD to run the m file. Both the PHP file running by the browser and the PHP file running by the command line can be perfectly implemented. You only need to use a command in the PHP file:
exec('matlab -nodesktop -minimize -r test')
That's all. Test is the m file of matlab. In this way, I don't need to open the matlab software to run m files and perform operations.
Similarly, I now want to use JuliaStudio to run the jl file under the command line. However, Baidu and Google did not find the file similar to that in the Matlab command line.
“-r”
And other running parameters. Can Julia directly run the specified m file by calling the JuliaStudio software from CMD?
Thank you!
Reply content:
Thank you for reading!
Recently, I encountered a problem in the project. At first I wanted to use the PHP language to open julia's REPL environment and run a jl file, but it was not successful. You can run the PHP file on the command line, but the browser cannot. For more information, see my previous question ----> link.
Considering that the REPL environment of julia may be called is different from that of common software, so it cannot be opened smoothly. Now, I want to use another method to change the idea:
We can see that PHP can use MATLAB called by CMD to run the m file. Both the PHP file running by the browser and the PHP file running by the command line can be perfectly implemented. You only need to use a command in the PHP file:
exec('matlab -nodesktop -minimize -r test')
That's all. Test is the m file of matlab. In this way, I don't need to open the matlab software to run m files and perform operations.
Similarly, I now want to use JuliaStudio to run the jl file under the command line. However, Baidu and Google did not find the file similar to that in the Matlab command line.“-r”
And other running parameters. Can Julia directly run the specified m file by calling the JuliaStudio software from CMD?
Thank you!
If julia is not added to the environment variable path, run
Julia installation path/julia.exe your *. jl path/xxx. jl
If an environment variable has been added, it can be simplified:
Julia.exe your *. jl path/xxx. jl
For windows, open the JL file by clicking the right button and choose to open it directly with julia.exe.
In the future, you can double-click it to run it. However, you need to pause the code after the code, otherwise you will not see the output result,
run(`cmd /c pause`)
Or enter your *. jl path/xxx. jl in cmd and press Enter.