# Win7 running Julia by bat file dispaly not works?

**URL:** https://discourse.julialang.org/t/win7-running-julia-by-bat-file-dispaly-not-works/35084
**Category:** General Usage
**Created:** [February 24, 2020, 7:25pm UTC](https://discourse.julialang.org/t/win7-running-julia-by-bat-file-dispaly-not-works/35084 "2020-02-24T19:25:11Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![programista](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/programista/32/5372_2.png) [@programista](https://discourse.julialang.org/u/programista)
#### Post date: [February 24, 2020, 7:25pm UTC](https://discourse.julialang.org/t/win7-running-julia-by-bat-file-dispaly-not-works/35084/1 "2020-02-24T19:25:11Z")

</div>

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:

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

```

display\_plot.jl:

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

```

REPL show"

```julia

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
julia> include("display_plot.jl")
package Plots imported
plot where?

```

Plot IS DISPLAYED

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

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [February 25, 2020, 7:13am UTC](https://discourse.julialang.org/t/win7-running-julia-by-bat-file-dispaly-not-works/35084/2 "2020-02-25T07:13:14Z")

</div>

Nothing is stopping the process from just exiting it seems?

---

<div class="post-metadata">

### Author: ![programista](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/programista/32/5372_2.png) [@programista](https://discourse.julialang.org/u/programista)
#### Post date: [February 25, 2020, 7:26am UTC](https://discourse.julialang.org/t/win7-running-julia-by-bat-file-dispaly-not-works/35084/3 "2020-02-25T07:26:50Z")

</div>

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

---

<div class="post-metadata">

### Author: ![programista](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/programista/32/5372_2.png) [@programista](https://discourse.julialang.org/u/programista)
#### Post date: [February 25, 2020, 7:50am UTC](https://discourse.julialang.org/t/win7-running-julia-by-bat-file-dispaly-not-works/35084/4 "2020-02-25T07:50:31Z")

</div>

Same behavior on Win10 on Vbox: No Plots.

```julia
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>

```

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [February 25, 2020, 9:28am UTC](https://discourse.julialang.org/t/win7-running-julia-by-bat-file-dispaly-not-works/35084/5 "2020-02-25T09:28:24Z")

</div>

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](https://github.com/JuliaPlots/Plots.jl/commit/00be8a223790cc54cfb8f3cedadc911e75da857b) and when you run with `-L` the code runs before the REPL loads.

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

---

<div class="post-metadata">

### Author: ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)
#### Post date: [February 25, 2020, 9:31am UTC](https://discourse.julialang.org/t/win7-running-julia-by-bat-file-dispaly-not-works/35084/6 "2020-02-25T09:31:55Z")

</div>

[https://github.com/JuliaLang/julia/pull/30922](https://github.com/JuliaLang/julia/pull/30922)  
should work around the issue.
