# Daml sandbox failed to start Java

**URL:** <https://forum.canton.network/t/daml-sandbox-failed-to-start-java/5433>\
**Category:** App Development\
**Created:** [October 17, 2022, 10:58pm UTC](https://forum.canton.network/t/daml-sandbox-failed-to-start-java/5433 "2022-10-17T22:58:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neelam\_Dwivedi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/neelam_dwivedi/32/4719_2.png) [@Neelam\_Dwivedi](https://forum.canton.network/u/Neelam_Dwivedi)\
**Post date:** [October 17, 2022, 10:58pm UTC](https://forum.canton.network/t/daml-sandbox-failed-to-start-java/5433/1 "2022-10-17T22:58:02Z")

</div>

I am trying to run the Wallet sample app on Windows. Cloned it from Git, and then ran the following command from the project root:

```haskell
daml sandbox --dar main/Asset/asset.dar --dar main/User/user.dar --dar main/Account/account.dar 

```

I get the following error:

```haskell
Starting Canton sandbox.
Listening at port 6865
Uploading main/Asset/asset.dar to localhost:6865
Failed to start java. Make sure it is installed and in the PATH.
daml-helper: main/Asset/asset.dar: openBinaryFile: does not exist (No such file or directory)

```

But Java is very much installed.

```haskell
java -version
java version "17.0.3" 2022-04-19 LTS
Java(TM) SE Runtime Environment (build 17.0.3+8-LTS-111)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.3+8-LTS-111, mixed mode, sharing)

```

Any suggestions?

---

<div class="post-metadata">

**Author:** ![stefanobaghino-da](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/stefanobaghino-da/32/7057_2.png) [@stefanobaghino-da](https://forum.canton.network/u/stefanobaghino-da)\
**Post date:** [October 18, 2022, 8:44am UTC](https://forum.canton.network/t/daml-sandbox-failed-to-start-java/5433/2 "2022-10-18T08:44:08Z")

</div>

The suggestion from the error is misleading (but happens to be helpful in the vast majority of cases 😉 ).

If you look closely, though, it appears that `main/Asset/asset.dar` does not exist. Can you double check that path? [From the README for the Wallet app](https://github.com/digital-asset/wallet-sample-app/tree/6d328641321bc5e4ea4327cbdf14f2a3330230dc#running-startsh-processes-manually) it looks like the step you’re going through requires to run a Make file right before that. Did that step complete successfully?

---

<div class="post-metadata">

**Author:** ![Neelam\_Dwivedi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/neelam_dwivedi/32/4719_2.png) [@Neelam\_Dwivedi](https://forum.canton.network/u/Neelam_Dwivedi)\
**Post date:** [October 18, 2022, 10:41am UTC](https://forum.canton.network/t/daml-sandbox-failed-to-start-java/5433/3 "2022-10-18T10:41:00Z")

</div>

No it didn’t. Since the readme gives an option to either run ‘make sandbox’ or ‘daml sandbox…’ posted above, I thought it is a workaround. The make sandbox instruction gives the following error:

```haskell
'cut' is not recognized as an internal or external command,
operable program or batch file.
daml sandbox --dar main/Asset/asset.dar --dar main/User/user.dar --dar main/Account/account.dar --port-file ./canton-port.txt
Starting Canton sandbox.
Listening at port 6865
Uploading main/Asset/asset.dar to localhost:6865
Failed to start java. Make sure it is installed and in the PATH.
daml-helper: main/Asset/asset.dar: openBinaryFile: does not exist (No such file or directory)
make: *** [Makefile:26: sandbox] Error 1

```

I am trying to see how to make the wallet-app run on Windows. I installed [chocolatey](https://chocolatey.org/) to get the dev tools. It gives ‘make’ and ‘grep’, but gets stuck at ‘cut’ as in the case above.

---

<div class="post-metadata">

**Author:** ![stefanobaghino-da](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/stefanobaghino-da/32/7057_2.png) [@stefanobaghino-da](https://forum.canton.network/u/stefanobaghino-da)\
**Post date:** [October 18, 2022, 11:02am UTC](https://forum.canton.network/t/daml-sandbox-failed-to-start-java/5433/4 "2022-10-18T11:02:27Z")

</div>

Apologies, I read it a bit in a rush and didn’t realize that using `make` was an alternative. Then if the file doesn’t exist it’s probably because you didn’t build the project in the step above, which is covered in the section above. It looks like you are supposed to run `make build`, which in turn seems to call `build.sh`. You can probably run [the steps therein](https://github.com/digital-asset/wallet-sample-app/blob/6d328641321bc5e4ea4327cbdf14f2a3330230dc/build.sh) manually to obtain the same result.

Alternatively for an easy way to work around the lack of native Windows support you might want to consider the possibility of using the [Windows Subsystem for Linux](https://learn.microsoft.com/en-us/windows/wsl/install) (WSL), which allows you to effectively run a fully fledged Linux distribution on top of your Windows box.

---

<div class="post-metadata">

**Author:** ![Neelam\_Dwivedi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/neelam_dwivedi/32/4719_2.png) [@Neelam\_Dwivedi](https://forum.canton.network/u/Neelam_Dwivedi)\
**Post date:** [October 18, 2022, 2:36pm UTC](https://forum.canton.network/t/daml-sandbox-failed-to-start-java/5433/5 "2022-10-18T14:36:53Z")

</div>

Thanks @stefanobaghino-da ! Running individual commands from build.sh creates the dar files. After that, the Daml Sandbox command works.
