Win7 running Julia by bat file dispaly not works?

No plot ! Why ?
Win7
in file start.bat is:
C:\Users\PC\AppData\Local\Julia-0.7.0\bin\julia.exe -L start.jl

in start.jl file is:

println("Pracujesz w aktalogu: ",pwd())
include("display_plot.jl")

display_plot.jl:

using Plots
println("package Plots imported")
display(plot(rand(5)))
println("plot where?")

REPL show"


D:\pawel\rynek\dzienniki\Dzienniki_2020>C:\Users\PC\AppData\Local\Julia-0.7.0\bin\julia.exe -L start.jl
Pracujesz w aktalogu: D:\pawel\rynek\dzienniki\Dzienniki_2020
package Plots imported
Plot{Plots.GRBackend() n=1}plot where?
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.7.0 (2018-08-08 06:46 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/                   |  x86_64-w64-mingw32

No plot !!! Why ?

If typing in REPL :

julia> include("display_plot.jl")
package Plots imported
plot where?

Plot IS DISPLAYED

What wrong in file *start.bat and start.jl ?
Paul

Nothing is stopping the process from just exiting it seems?

Nothing. Just enter in REPL one line from start.jl:
include(“display_plot.jl”)
and the plot appears!
Paul

Same behavior on Win10 on Vbox: No Plots.

C:\Users\progr\Desktop\test>C:\Users\progr\AppData\Local\Julia-0.7.0\bin\julia.exe -L start.jl
Pracujesz w aktalogu: C:\Users\progr\Desktop\test
package Plots imported
Plot{Plots.GRBackend() n=1}plot where?
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.7.0 (2018-08-08 06:46 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/                   |  x86_64-w64-mingw32

julia>

Okay, I think the reason is that the “PlotsDisplay” doesn’t get properly put into the “display stack” until after the REPL has been loaded: make sure display order is correct if Plots is loaded before the REPL · JuliaPlots/Plots.jl@00be8a2 · GitHub and when you run with -L the code runs before the REPL loads.

I’m not really sure how it should be worked around.

https://github.com/JuliaLang/julia/pull/30922
should work around the issue.