# Where to put a jdbc driver on windows 10 for stardog?

**URL:** <https://community.stardog.com/t/where-to-put-a-jdbc-driver-on-windows-10-for-stardog/3648>\
**Category:** Support\
**Created:** [March 29, 2022, 6:53pm UTC](https://community.stardog.com/t/where-to-put-a-jdbc-driver-on-windows-10-for-stardog/3648 "2022-03-29T18:53:18Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![R3000](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/r3000/32/358_2.png) [@R3000](https://community.stardog.com/u/R3000)\
**Post date:** [March 29, 2022, 6:53pm UTC](https://community.stardog.com/t/where-to-put-a-jdbc-driver-on-windows-10-for-stardog/3648/1 "2022-03-29T18:53:18Z")

</div>

In this tutorial [Using Virtual Graphs | Stardog Documentation Latest](https://docs.stardog.com/tutorials/using-virtual-graphs) I find these instructions for Linux (but none for Windows):

> JDBC Setup

Stardog does not ship with JDBC drivers so you need to manually copy the JAR file containing the driver for your RDBMS into the classpath of the Stardog server. The preferred way of doing this is by setting the `STARDOG_EXT` environment variable to point to a directory outside the Stardog installation directory and copy the jar file there:

```auto
$ export STARDOG_EXT=/opt/stardog/ext
$ mkdir $STARDOG_EXT
$ cp JDBC_JAR_FILE $STARDOG_EXT

```

**Note that the environment variable needs to be set before the Stardog server is started.** If the variable was already set before the server is started then the JAR files can be copied to that location while the server is running without a restart.

Where is the right place to place this mysql jdbc jar file on windows 10 stardog installation?

Thanks,  
Radu

---

<div class="post-metadata">

**Author:** ![stephen](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/stephen/32/27_2.png) [@stephen](https://community.stardog.com/u/stephen)\
**Post date:** [March 29, 2022, 6:58pm UTC](https://community.stardog.com/t/where-to-put-a-jdbc-driver-on-windows-10-for-stardog/3648/2 "2022-03-29T18:58:59Z")

</div>

Hi Radu,

You can place them inside the Stardog installation directory under server/dbms. You can also set an environment variable (either system level, user level, or in a command prompt) for STARDOG\_EXT and place the jar(s) there

---

<div class="post-metadata">

**Author:** ![Cathy\_Dalzell](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/cathy_dalzell/32/1202_2.png) [@Cathy\_Dalzell](https://community.stardog.com/u/Cathy_Dalzell)\
**Post date:** [March 29, 2022, 7:08pm UTC](https://community.stardog.com/t/where-to-put-a-jdbc-driver-on-windows-10-for-stardog/3648/3 "2022-03-29T19:08:44Z")

</div>

I believe you can put it anywhere you want. Create a folder, possibly in your home directory, to contain the jar. Add that folder to your path and create an environment variable for STARDOG\_EXT. Its value should be the complete pathname of your new folder.

---

<div class="post-metadata">

**Author:** ![R3000](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/r3000/32/358_2.png) [@R3000](https://community.stardog.com/u/R3000)\
**Post date:** [March 29, 2022, 7:52pm UTC](https://community.stardog.com/t/where-to-put-a-jdbc-driver-on-windows-10-for-stardog/3648/4 "2022-03-29T19:52:20Z")

</div>

strange - my path ends with ...;C:\STARDOG\_EXT and

```auto
dir C:\STARDOG_EXT results in:
 Directory of C:\STARDOG_EXT
03/29/2022 03:34 PM <DIR> .
03/29/2022 03:34 PM <DIR> ..
03/29/2022 02:25 PM 2,476,480 mysql-connector-java-8.0.28.jar

```

Then I restarted the Stardog service and still no luck - getting  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/8/83715e521c25ecc691d6d83853db16e88a3e211e.png)

---

<div class="post-metadata">

**Author:** ![Cathy\_Dalzell](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/cathy_dalzell/32/1202_2.png) [@Cathy\_Dalzell](https://community.stardog.com/u/Cathy_Dalzell)\
**Post date:** [March 29, 2022, 8:04pm UTC](https://community.stardog.com/t/where-to-put-a-jdbc-driver-on-windows-10-for-stardog/3648/5 "2022-03-29T20:04:46Z")

</div>

Did you create the environment variable as well?

---

<div class="post-metadata">

**Author:** ![R3000](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/r3000/32/358_2.png) [@R3000](https://community.stardog.com/u/R3000)\
**Post date:** [March 29, 2022, 8:19pm UTC](https://community.stardog.com/t/where-to-put-a-jdbc-driver-on-windows-10-for-stardog/3648/6 "2022-03-29T20:19:13Z")

</div>

yes - i did for my local account  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/8/865f274a5f071e31d7effdb4125f6cc5528ead27.png)

---

<div class="post-metadata">

**Author:** ![zachary.whitley](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/zachary.whitley/32/94_2.png) [@zachary.whitley](https://community.stardog.com/u/zachary.whitley)\
**Post date:** [March 29, 2022, 8:22pm UTC](https://community.stardog.com/t/where-to-put-a-jdbc-driver-on-windows-10-for-stardog/3648/7 "2022-03-29T20:22:16Z")

</div>

That should work, although it's a little confusing having the directory the exact same name as the env variable. You also have to have permissions to read the jar in that directory for the user that is running Stardog. You'll also need to restart Stardog for it to see the env variable.....maybe. I'm actually not sure exactly how windows handles shells and env variables but it couldn't hurt to restart.

---

<div class="post-metadata">

**Author:** ![R3000](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/r3000/32/358_2.png) [@R3000](https://community.stardog.com/u/R3000)\
**Post date:** [March 29, 2022, 8:50pm UTC](https://community.stardog.com/t/where-to-put-a-jdbc-driver-on-windows-10-for-stardog/3648/8 "2022-03-29T20:50:23Z")

</div>

finally - a 2x4 approach worked - copied the file into \client\api - and it worked!

---

<div class="post-metadata">

**Author:** ![zachary.whitley](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/zachary.whitley/32/94_2.png) [@zachary.whitley](https://community.stardog.com/u/zachary.whitley)\
**Post date:** [March 30, 2022, 11:30am UTC](https://community.stardog.com/t/where-to-put-a-jdbc-driver-on-windows-10-for-stardog/3648/9 "2022-03-30T11:30:55Z")

</div>

That’s odd because that shouldn’t have worked or at least that might not have been what did it. I would suggest figuring out what the problem was with using the STARDOG\_EXT environment variable. You can alternatively create the directory $STARDOG\_HOME/server/ext and put it in there. That keeps your ext jars separate from the system jars. The advantage to using the environment variable is it survives upgrades.

As always it needs to be readable by the user that is running Stardog.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [April 4, 2022, 7:08pm UTC](https://community.stardog.com/t/where-to-put-a-jdbc-driver-on-windows-10-for-stardog/3648/10 "2022-04-04T19:08:43Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [April 11, 2022, 1:14pm UTC](https://community.stardog.com/t/where-to-put-a-jdbc-driver-on-windows-10-for-stardog/3648/11 "2022-04-11T13:14:23Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [April 19, 2022, 12:15am UTC](https://community.stardog.com/t/where-to-put-a-jdbc-driver-on-windows-10-for-stardog/3648/12 "2022-04-19T00:15:27Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [April 27, 2022, 12:50pm UTC](https://community.stardog.com/t/where-to-put-a-jdbc-driver-on-windows-10-for-stardog/3648/13 "2022-04-27T12:50:02Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [May 7, 2022, 4:59pm UTC](https://community.stardog.com/t/where-to-put-a-jdbc-driver-on-windows-10-for-stardog/3648/14 "2022-05-07T16:59:31Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [May 21, 2022, 4:59pm UTC](https://community.stardog.com/t/where-to-put-a-jdbc-driver-on-windows-10-for-stardog/3648/15 "2022-05-21T16:59:57Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
