# \[SOLVED\] Does Dotty support Java's Jigsaw

**URL:** <https://users.scala-lang.org/t/solved-does-dotty-support-javas-jigsaw/6561>\
**Category:** Question\
**Created:** [September 3, 2020, 2:47pm UTC](https://users.scala-lang.org/t/solved-does-dotty-support-javas-jigsaw/6561 "2020-09-03T14:47:57Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![hmf](https://users.scala-lang.org/user_avatar/users.scala-lang.org/hmf/32/426_2.png) [@hmf](https://users.scala-lang.org/u/hmf)\
**Post date:** [September 4, 2020, 10:07am UTC](https://users.scala-lang.org/t/solved-does-dotty-support-javas-jigsaw/6561/3 "2020-09-04T10:07:24Z")

</div>

@tarsa thanks for the info. The first 3 links you provide I already had looked at. Your example however, I did not find, though I had searched (other threads also have JFX examples). But I have already set-up and used a Mill project much like your example. However, in my example I had to set the JVM arguments so:

```auto
JAVA_OPTS="--module-path=/usr/share/openjfx/lib --add-modules=javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web --add-reads=javafx.graphics=ALL-UNNAMED --add-opens=javafx.graphics/com.sun.glass.ui=ALL-UNNAMED --add-opens=javafx.controls/com.sun.javafx.charts=ALL-UNNAMED --add-opens=javafx.graphics/com.sun.javafx.iio=ALL-UNNAMED --add-opens=javafx.graphics/com.sun.javafx.iio.common=ALL-UNNAMED --add-opens=javafx.graphics/com.sun.javafx.css=ALL-UNNAMED --add-opens=javafx.graphics/com.sun.javafx.application=ALL-UNNAMED --add-opens=javafx.base/com.sun.javafx.runtime=ALL-UNNAMED"

```

I have 2 issues. First, you said:

> [@Scala, JDK 11 and JPMS](https://users.scala-lang.org/t/scala-jdk-11-and-jpms/6102/19):
>
> Once again SBT uses old (pre JPMS) `-classpath` switch instead of new (JPMS related) `--add-modules` and the likes.

but I had to add these `--add-modules` in Mill. I need to check this again. Do you know if SBT does anything specific for this case?

The second is, I am assuming that according to your feedback I need only add the JDK library to the dependencies. If so, how do I configure this in SBT or any other build tool? Note that this is a module (not a jar) and I have a `jmod`:

```auto
/usr/lib/jvm/java-11-openjdk-amd64/jmods/java.net.http.jmod
/usr/lib/jvm/java-11-openjdk-amd64/legal/java.net.http
/usr/lib/jvm/java-11-openjdk-amd64/legal/java.net.http/ASSEMBLY_EXCEPTION

```

I can list and extract its contents using `jmod`. Looks like a jar, but I don’t think it is feasible to be use as a Jar (seen someone else [attempt this](https://stackoverflow.com/questions/38267059/add-a-custom-jmod-to-the-module-path-with-java-9)).

Appreciate any help.  
TIA

---

_[View the full topic](https://users.scala-lang.org/t/solved-does-dotty-support-javas-jigsaw/6561)._
