Skip to content

Commit c5dd11e

Browse files
authored
Merge pull request #3129 from jatcwang/doc-list-jvm
Doc: Tips on how to list available JVMs using coursier
2 parents 231c211 + 3fa3909 commit c5dd11e

File tree

7 files changed

+20
-16
lines changed

7 files changed

+20
-16
lines changed

modules/cli/src/main/scala/scala/cli/commands/shared/SharedJvmOptions.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ final case class SharedJvmOptions(
1818
javaHome: Option[String] = None,
1919

2020
@Group(HelpGroup.Java.toString)
21-
@HelpMessage("Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`")
21+
@HelpMessage("Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`. " +
22+
"scala-cli uses [coursier](https://get-coursier.io/) to fetch JVMs, so you can use `cs java --available` to list the available JVMs.")
2223
@ValueDescription("jvm-name")
2324
@Tag(tags.should)
2425
@Name("j")

modules/directives/src/main/scala/scala/build/preprocessing/directives/Jvm.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ import scala.cli.commands.SpecificationLevel
1414
"//> using jvm _value_",
1515
"`//> using jvm` _value_"
1616
)
17-
@DirectiveDescription("Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`")
17+
@DirectiveDescription(
18+
"Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`. " +
19+
"scala-cli uses [coursier](https://get-coursier.io/) to fetch JVMs, so you can use `cs java --available` to list the available JVMs."
20+
)
1821
@DirectiveLevel(SpecificationLevel.SHOULD)
1922
// format: off
2023
final case class Jvm(

website/docs/reference/cli-options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ Set the Java home directory
639639

640640
Aliases: `-j`
641641

642-
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`
642+
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`. scala-cli uses [coursier](https://get-coursier.io/) to fetch JVMs, so you can use `cs java --available` to list the available JVMs.
643643

644644
### `--jvm-index`
645645

website/docs/reference/directives.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Exclude sources from the project
127127

128128
### JVM version
129129

130-
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`
130+
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`. scala-cli uses [coursier](https://get-coursier.io/) to fetch JVMs, so you can use `cs java --available` to list the available JVMs.
131131

132132
`//> using jvm` _value_
133133

website/docs/reference/scala-command/cli-options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ Aliases: `-j`
570570

571571
`SHOULD have` per Scala Runner specification
572572

573-
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`
573+
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`. scala-cli uses [coursier](https://get-coursier.io/) to fetch JVMs, so you can use `cs java --available` to list the available JVMs.
574574

575575
### `--jvm-index`
576576

website/docs/reference/scala-command/directives.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ Exclude sources from the project
151151

152152
### JVM version
153153

154-
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`
154+
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`. scala-cli uses [coursier](https://get-coursier.io/) to fetch JVMs, so you can use `cs java --available` to list the available JVMs.
155155

156156
`//> using jvm` _value_
157157

website/docs/reference/scala-command/runner-specification.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ Set the Java home directory
238238

239239
**--jvm**
240240

241-
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`
241+
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`. scala-cli uses [coursier](https://get-coursier.io/) to fetch JVMs, so you can use `cs java --available` to list the available JVMs.
242242

243243
Aliases: `-j`
244244

@@ -706,7 +706,7 @@ Set the Java home directory
706706

707707
**--jvm**
708708

709-
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`
709+
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`. scala-cli uses [coursier](https://get-coursier.io/) to fetch JVMs, so you can use `cs java --available` to list the available JVMs.
710710

711711
Aliases: `-j`
712712

@@ -1019,7 +1019,7 @@ Set the Java home directory
10191019

10201020
**--jvm**
10211021

1022-
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`
1022+
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`. scala-cli uses [coursier](https://get-coursier.io/) to fetch JVMs, so you can use `cs java --available` to list the available JVMs.
10231023

10241024
Aliases: `-j`
10251025

@@ -1602,7 +1602,7 @@ Set the Java home directory
16021602

16031603
**--jvm**
16041604

1605-
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`
1605+
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`. scala-cli uses [coursier](https://get-coursier.io/) to fetch JVMs, so you can use `cs java --available` to list the available JVMs.
16061606

16071607
Aliases: `-j`
16081608

@@ -2217,7 +2217,7 @@ Set the Java home directory
22172217

22182218
**--jvm**
22192219

2220-
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`
2220+
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`. scala-cli uses [coursier](https://get-coursier.io/) to fetch JVMs, so you can use `cs java --available` to list the available JVMs.
22212221

22222222
Aliases: `-j`
22232223

@@ -2845,7 +2845,7 @@ Set the Java home directory
28452845

28462846
**--jvm**
28472847

2848-
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`
2848+
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`. scala-cli uses [coursier](https://get-coursier.io/) to fetch JVMs, so you can use `cs java --available` to list the available JVMs.
28492849

28502850
Aliases: `-j`
28512851

@@ -3449,7 +3449,7 @@ Set the Java home directory
34493449

34503450
**--jvm**
34513451

3452-
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`
3452+
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`. scala-cli uses [coursier](https://get-coursier.io/) to fetch JVMs, so you can use `cs java --available` to list the available JVMs.
34533453

34543454
Aliases: `-j`
34553455

@@ -4090,7 +4090,7 @@ Set the Java home directory
40904090

40914091
**--jvm**
40924092

4093-
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`
4093+
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`. scala-cli uses [coursier](https://get-coursier.io/) to fetch JVMs, so you can use `cs java --available` to list the available JVMs.
40944094

40954095
Aliases: `-j`
40964096

@@ -4782,7 +4782,7 @@ Set the Java home directory
47824782

47834783
**--jvm**
47844784

4785-
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`
4785+
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`. scala-cli uses [coursier](https://get-coursier.io/) to fetch JVMs, so you can use `cs java --available` to list the available JVMs.
47864786

47874787
Aliases: `-j`
47884788

@@ -5715,7 +5715,7 @@ Set the Java home directory
57155715

57165716
**--jvm**
57175717

5718-
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`
5718+
Use a specific JVM, such as `14`, `adopt:11`, or `graalvm:21`, or `system`. scala-cli uses [coursier](https://get-coursier.io/) to fetch JVMs, so you can use `cs java --available` to list the available JVMs.
57195719

57205720
Aliases: `-j`
57215721

0 commit comments

Comments
 (0)