# How to link .jl files with Julia 0.7 or 1.0 on windows 7

**URL:** <https://discourse.julialang.org/t/how-to-link-jl-files-with-julia-0-7-or-1-0-on-windows-7/13180>\
**Category:** New to Julia\
**Tags:** installation\
**Created:** [August 10, 2018, 1:03pm UTC](https://discourse.julialang.org/t/how-to-link-jl-files-with-julia-0-7-or-1-0-on-windows-7/13180 "2018-08-10T13:03:59Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fred](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fred/32/14175_2.png) [@Fred](https://discourse.julialang.org/u/Fred)\
**Post date:** [August 10, 2018, 1:03pm UTC](https://discourse.julialang.org/t/how-to-link-jl-files-with-julia-0-7-or-1-0-on-windows-7/13180/1 "2018-08-10T13:03:59Z")

</div>

Hi !

I am Linux user and I plan to distribute a Julia software. So, unfortunately, I have to deal with windows and to make an installation tutorial.  
When I install Julia 0.7 on win7 64bits, the .jl files are not linked with Julia-0.7.0/bin/julia.

When I try to do this association manually using the “open with” form, I select the C:\User\Fred\AppData\local\Julia-0.7.0\bin\julia but the Julia software does not appear in the form. And no link seems possible.

So, in Windows, it is very easy to use REPL interactively after Julia installation. But non interactive use of Julia seems to be really very difficult. If I click on a .jl file, Julia does not start. If I type “julia” on the command prompt, I see that Julia is not in the PATH.

I would like to start my software with a simple click because my users are not programmers. If I just “slide” my .jl file on the Julia shortcut, the software start but then execution is not possible because it does not execute in the software directory where some files are necessary…

Thank you for your help !

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [August 10, 2018, 1:31pm UTC](https://discourse.julialang.org/t/how-to-link-jl-files-with-julia-0-7-or-1-0-on-windows-7/13180/2 "2018-08-10T13:31:18Z")

</div>

> [@Fred](#):
>
> When I try to do this association manually using the “open with” form, I select the C:\User\Fred\AppData\local\Julia-0.7.0\bin\julia but the Julia software does not appear in the form. And no link seems possible.

I have tried this and it works exactly as you describe and as it is expected (tried on Win7 64bit and Win10 64bit).  
So only difference here is, that the julia.exe is in c:\Program Files\Julia-0.7.0-DEV\bin\ but I am pretty sure that it should work with any path to the julia.exe.

My guess is that it is something on your Windows machine, maybe some group policy (your admins not allowing this kind of action). You could try to do the same with another file type and another .exe, to see if this is the case.

---

<div class="post-metadata">

**Author:** ![Fred](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fred/32/14175_2.png) [@Fred](https://discourse.julialang.org/u/Fred)\
**Post date:** [August 10, 2018, 2:04pm UTC](https://discourse.julialang.org/t/how-to-link-jl-files-with-julia-0-7-or-1-0-on-windows-7/13180/3 "2018-08-10T14:04:04Z")

</div>

@oheil thank you very much for your answer !

I uninstall Julia. Then I started again the installer.exe (right click install as administrator) and I installed Julia in c:\Program Files\Julia-0.7.0

Then I click on a .jl file , tried to associate jl file with c:\Program Files\Julia-0.7.0\bin\julia and I failed again ☹ So I suppose something is wrong with my windows (I use a virtualbox image of window on Linux to make a video tutorial)…

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [August 10, 2018, 2:06pm UTC](https://discourse.julialang.org/t/how-to-link-jl-files-with-julia-0-7-or-1-0-on-windows-7/13180/4 "2018-08-10T14:06:53Z")

</div>

Maybe this:

> **[Can't associate a program with an extension - Windows Client](https://learn.microsoft.com/en-US/troubleshoot/windows-client/shell-experience/cannot-associate-program-with-extension)**
>
> You can't associate a program with an extension in Windows 7 because the program that you're pointing to isn't registered correctly.

Shouldn’t make any difference if virtual or not.

---

<div class="post-metadata">

**Author:** ![Fred](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fred/32/14175_2.png) [@Fred](https://discourse.julialang.org/u/Fred)\
**Post date:** [August 10, 2018, 2:09pm UTC](https://discourse.julialang.org/t/how-to-link-jl-files-with-julia-0-7-or-1-0-on-windows-7/13180/5 "2018-08-10T14:09:32Z")

</div>

@oheil Thank you again !

I will try… but I cannot show that on a video tutorial 😃

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [August 10, 2018, 2:10pm UTC](https://discourse.julialang.org/t/how-to-link-jl-files-with-julia-0-7-or-1-0-on-windows-7/13180/6 "2018-08-10T14:10:39Z")

</div>

To register the exe correctly it may be sufficient to install julia with admin rights.  
I think thats what I have done in the past, when I installed julia to have it in C.\Programs…

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [August 10, 2018, 2:12pm UTC](https://discourse.julialang.org/t/how-to-link-jl-files-with-julia-0-7-or-1-0-on-windows-7/13180/7 "2018-08-10T14:12:56Z")

</div>

Yes, I understand that part 🙂  
At least for my Windows 10 machine the setup is more like yours: installed without admin rights directly into my AppData path, no issues, associating .jl to the exe there works.

---

<div class="post-metadata">

**Author:** ![bernhard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bernhard/32/2619_2.png) [@bernhard](https://discourse.julialang.org/u/bernhard)\
**Post date:** [August 10, 2018, 2:14pm UTC](https://discourse.julialang.org/t/how-to-link-jl-files-with-julia-0-7-or-1-0-on-windows-7/13180/8 "2018-08-10T14:14:56Z")

</div>

You can simply do something along the following (in the command prompt)  
`C:\Julia-0.7.X\bin\julia.exe "c:\\temp\\myscript.jl"`

this should run mysript.jl

I would suggest to put julia.exe in your PATH though.  
I am personally not a fan of double-clicking and executing a script. To the best of my knowledge this is commonly not done (e.g. by Windows users of Julia/R/Matlab/… ).

If you cannot associate it, a \*.bat file (batch file) would do the trick by including something along the code above. Google should help you on this topic too (also how you can set the working directory prior to invoking julia.exe)

---

<div class="post-metadata">

**Author:** ![Fred](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fred/32/14175_2.png) [@Fred](https://discourse.julialang.org/u/Fred)\
**Post date:** [August 10, 2018, 6:59pm UTC](https://discourse.julialang.org/t/how-to-link-jl-files-with-julia-0-7-or-1-0-on-windows-7/13180/9 "2018-08-10T18:59:13Z")

</div>

@bernhard, I completely agree with you. I decided to stop using windows 20 years ago and use GNU Linux instead. This is by far my best my best decision in computer science. But I have made a tool for biologists and there is no-way they type command lines 🙂

When I have to share a software with windows users, if possible, I do it in Golang because cross compilation is so easy. But this time, I need large dataframes and Julia was easier than Go 😉

The idea of a .bat file is great, but, to use it, I think that I must know exactly where the user will install Julia…

---

<div class="post-metadata">

**Author:** ![visr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/visr/32/17204_2.png) [@visr](https://discourse.julialang.org/u/visr)\
**Post date:** [August 10, 2018, 7:19pm UTC](https://discourse.julialang.org/t/how-to-link-jl-files-with-julia-0-7-or-1-0-on-windows-7/13180/10 "2018-08-10T19:19:45Z")

</div>

> When I try to do this association manually using the “open with” form, I select the C:\User\Fred\AppData\local\Julia-0.7.0\bin\julia but the Julia software does not appear in the form. And no link seems possible.

There is no open with / choose default program, where you can then put in the path to the julia binary? I just tried it (Win 7), and this works fine for me, I tested with:

```julia
println("hi")
@show pwd()
sleep(3)

```

Which then opens up a prompt which shows:

```julia
hi
pwd() = "c:\\tmp\\runjl"

```

For 3 seconds and then the window closes automatically. I assume this is what you want?  
I would also recommend putting julia in the path and showing them how to work the REPL though.

---

<div class="post-metadata">

**Author:** ![Fred](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fred/32/14175_2.png) [@Fred](https://discourse.julialang.org/u/Fred)\
**Post date:** [August 10, 2018, 7:33pm UTC](https://discourse.julialang.org/t/how-to-link-jl-files-with-julia-0-7-or-1-0-on-windows-7/13180/11 "2018-08-10T19:33:57Z")

</div>

> [@visr](#):
>
> There is no open with / choose default program, where you can then put in the path to the julia binary? I just tried it (Win 7), and this works fine for me, I tested with:

Yes there is 🙂 and I know how to use it because in the past I succeeded (I do not remember with which version of Julia it was around 5.0) but this time, with Julia 0.6 or 0.7 it refuses to do it ! 😃

Since many of you managed easily to do the association of \*.jl with Julia, I think that I have a problem in my windows install 🙄

---

<div class="post-metadata">

**Author:** ![kevbonham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevbonham/32/216165_2.png) [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Post date:** [August 11, 2018, 3:01am UTC](https://discourse.julialang.org/t/how-to-link-jl-files-with-julia-0-7-or-1-0-on-windows-7/13180/12 "2018-08-11T03:01:15Z")

</div>

> [@Fred](#):
>
> But I have made a tool for biologists and there is no-way they type command lines 🙂

Aww c’mon… We’re not _that_ bad. Most biologists can at least copy-paste into the command line, even if it make our palms sweaty.

---

<div class="post-metadata">

**Author:** ![bernhard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bernhard/32/2619_2.png) [@bernhard](https://discourse.julialang.org/u/bernhard)\
**Post date:** [August 11, 2018, 5:59am UTC](https://discourse.julialang.org/t/how-to-link-jl-files-with-julia-0-7-or-1-0-on-windows-7/13180/13 "2018-08-11T05:59:51Z")

</div>

regarding open with:  
you should be able to  
shift right click on any file with “.jl” ending, open with, chose another app, more apps, look for another app on this pc

this should bring you to an exporer-ish window where you can select any executable.

You are saying julia.exe exists, but is not visible in that window?  
Can you give us a screenshot?  
I can confirm what visr said above, it is working (notably I am a windows user; you seem to have misunderstood me 🙂 )

---

<div class="post-metadata">

**Author:** ![Fred](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fred/32/14175_2.png) [@Fred](https://discourse.julialang.org/u/Fred)\
**Post date:** [August 11, 2018, 11:21am UTC](https://discourse.julialang.org/t/how-to-link-jl-files-with-julia-0-7-or-1-0-on-windows-7/13180/14 "2018-08-11T11:21:55Z")

</div>

> [@kevbonham](#):
>
> We’re not _that_ bad. Most biologists can at least copy-paste into the command line, even if it make our palms sweat

Of course they are not that bad ! But most of them are so afraid by terminals that they even do not want to give a try ! 😄

---

<div class="post-metadata">

**Author:** ![Fred](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fred/32/14175_2.png) [@Fred](https://discourse.julialang.org/u/Fred)\
**Post date:** [August 13, 2018, 7:50am UTC](https://discourse.julialang.org/t/how-to-link-jl-files-with-julia-0-7-or-1-0-on-windows-7/13180/15 "2018-08-13T07:50:16Z")

</div>

@bernhard, I have made a video here :

> **[Send large files up to 5GB for free](https://transfer.pcloud.com/download.html?code=5ZIwks7Z08htOdmTdUfZAlAbZRKUbJxN7Xhb5ubQMxE5tWj4chiSk)**
>
> With pCloud Transfer you can download large files without registration for free! You can also send your own files to your colleagues and friends.

I think that my windows as a problem 😝

---

<div class="post-metadata">

**Author:** ![bernhard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bernhard/32/2619_2.png) [@bernhard](https://discourse.julialang.org/u/bernhard)\
**Post date:** [August 13, 2018, 8:29am UTC](https://discourse.julialang.org/t/how-to-link-jl-files-with-julia-0-7-or-1-0-on-windows-7/13180/16 "2018-08-13T08:29:01Z")

</div>

Indeed that is a strange issue. It seems your VM uses Windows7. I do not have any such machine handy.  
I am not sure how to fix that… (google might be helpful though). I would expect that this is not julia related.

---

<div class="post-metadata">

**Author:** ![Fred](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fred/32/14175_2.png) [@Fred](https://discourse.julialang.org/u/Fred)\
**Post date:** [August 13, 2018, 8:34am UTC](https://discourse.julialang.org/t/how-to-link-jl-files-with-julia-0-7-or-1-0-on-windows-7/13180/17 "2018-08-13T08:34:08Z")

</div>

> [@bernhard](#):
>
> I would expect that this is not julia related.

The source of the issue is unclear, because, in the past with old Julia version, I remember to have succeeded. Since I used this win7 VM to test many Julia versions, it is possible that when I un-install Julia to upgrade, something useful is removed or it is because I have a French version of windows…

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [August 13, 2018, 9:46am UTC](https://discourse.julialang.org/t/how-to-link-jl-files-with-julia-0-7-or-1-0-on-windows-7/13180/18 "2018-08-13T09:46:36Z")

</div>

I was able to reproduce what you are experiencing by playing around with the registry mentioned in the microsoft support article above.

I guess you don’t have write access to the registry key  
HKEY\_CLASSES\_ROOT\Applications

Open the registry editor  
regedit.exe

Navigate to  
HKEY\_CLASSES\_ROOT\Applications

Right Click in the left pane on “Applications” and choose “permissions” (your french pendant).

You or “Users” should have “Full access” to it, if not, change it so that you can write and edit this key and everything beneath.

If I remove the write access on my computer I have exactly the same behaviour. If I also remove read access I don’t see any application to associate with.

---

<div class="post-metadata">

**Author:** ![Fred](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fred/32/14175_2.png) [@Fred](https://discourse.julialang.org/u/Fred)\
**Post date:** [August 13, 2018, 12:28pm UTC](https://discourse.julialang.org/t/how-to-link-jl-files-with-julia-0-7-or-1-0-on-windows-7/13180/19 "2018-08-13T12:28:12Z")

</div>

@oheil thank you very much for taking the time to answer. The user already add the “Full access” right in HKEY\_CLASSES\_ROOT\Applications.

But, interestingly, I found a julia.exe key pointing to AppData\local\Julia-0.6.3\bin\julia.exe !  
So it seems that the uninstall program of julia 6.3 did not fully uninstall the software, and maybe, the install software of Julia 1.0 cannot overwrite the old key…

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [August 13, 2018, 12:32pm UTC](https://discourse.julialang.org/t/how-to-link-jl-files-with-julia-0-7-or-1-0-on-windows-7/13180/20 "2018-08-13T12:32:56Z")

</div>

Yes, something like that.

It did no harm deleting the julia key in the tree. After going the association task (browsing to julia.exe and so on) the key was newly created and then it appeared in the list of applications to associate with. It did not appear and the julia key was not created if I removed the rights for this. ie. setting to read only.

[Next page](https://discourse.julialang.org/t/how-to-link-jl-files-with-julia-0-7-or-1-0-on-windows-7/13180.md?page=2)
