3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Windows 11にmiseをインストールする

3
Last updated at Posted at 2025-12-03

What's?

あまりWindowsでVersion Managerを使ってこなかったのですが、そろそろ…ということでmiseを使うことにしました。

特にPowerShellで使おうとしてハマった記憶があったので、落ち着いて見ていってみましょう。

mise

miseのWebサイトはこちらです。

miseは多言語対応のバージョン管理ツールです。またタスクランナーでもあります。

今回はバージョン管理ツールとしての面で見ていきます。

使える…というか管理できるツールはこちらですね。

コアツールとなっているものは以下のようです。

  • Bun
  • Deno
  • Elixir
  • Erlang
  • Go
  • Java
  • Node.js
  • Python
  • Ruby
  • Rust
  • Swift
  • Zig

環境

今回の環境です。

PS > [System.Environment]::OSVersion

Platform ServicePack Version      VersionString
-------- ----------- -------      -------------
 Win32NT             10.0.22621.0 Microsoft Windows NT 10.0.22621.0


PS > $PSVersionTable.PSVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      22621  6060


miseをインストールする

miseをインストールします。インストール方法はwingetを選びます。

Installing mise / Windows - winget

PS > winget install jdx.mise

インストール自体は簡単ですね。

PS > winget install jdx.mise
見つかりました mise-en-place [jdx.mise] バージョン 2025.11.11
このアプリケーションは所有者からライセンス供与されます。
Microsoft はサードパーティのパッケージに対して責任を負わず、ライセンスも付与しません。
このパッケージには次の依存関係が必要です:
  - パッケージ
      Microsoft.VCRedist.2015+.x64
(1/1) 見つかりました Microsoft Visual C++ 2015-2022 Redistributable (x64) [Microsoft.VCRedist.2015+.x64] バージョン 14.50.35719.0
このアプリケーションは所有者からライセンス供与されます。
Microsoft はサードパーティのパッケージに対して責任を負わず、ライセンスも付与しません。
ダウンロード中 https://download.visualstudio.microsoft.com/download/pr/6f02464a-5e9b-486d-a506-c99a17db9a83/8995548DFFFCDE7C49987029C764355612BA6850EE09A7B6F0FDDC85BDC5C280/VC_redist.x64.exe
  ██████████████████████████████  17.6 MB / 17.6 MB
インストーラーハッシュが正常に検証されました
パッケージのインストールを開始しています...
インストールが完了しました

ダウンロード中 https://github.com/jdx/mise/releases/download/v2025.11.11/mise-v2025.11.11-windows-x64.zip
  ██████████████████████████████  20.1 MB / 20.1 MB
インストーラーハッシュが正常に検証されました
アーカイブを展開しています...
アーカイブが正常に展開されました
パッケージのインストールを開始しています...
コマンド ライン エイリアスが追加されました: "mise"
パス環境変数が変更されました; 新しい値を使用するにはシェルを再起動してください。
インストールが完了しました

環境変数Pathを変更したと言っているので、PowerShellを再起動すると反映されています。

PS > mise version
              _                                        __
   ____ ___  (_)_______        ___  ____        ____  / /___ _________
  / __ `__ \/ / ___/ _ \______/ _ \/ __ \______/ __ \/ / __ `/ ___/ _ \
 / / / / / / (__  )  __/_____/  __/ / / /_____/ /_/ / / /_/ / /__/  __/
/_/ /_/ /_/_/____/\___/      \___/_/ /_/     / .___/_/\__,_/\___/\___/
                                            /_/                 by @jdx
2025.11.11 windows-x64 (2025-11-30)

こちらも設定しておきましょう。

PS > echo 'mise activate pwsh | Out-String | Invoke-Expression' >> $PROFILE

Installing mise / Shells / Powershell

ですが、このバージョンのPowerShellだと警告が表示されます。

WARNING: mise: chpwd functionality requires PowerShell version 7 or higher. Your current version is 5.1.22621.6060. You can add $env:MISE_PWSH_CHPWD_WARNING=0 to your environment to disable
 this warning.

この場合はこうですね。Shimsを使います。

PS > echo 'mise activate pwsh --shims | Out-String | Invoke-Expression' >> $PROFILE

Shimsのページを見てもわからないのですが、pwshをつけておく必要があります。

miseでJava、Apache Mavenを管理してみます

試しにということで、JavaやApache Mavenをmiseで管理してみましょう。

まずはJavaから。Eclipse Temurinを使うことしましょう。

利用できるJavaを確認…すると大量に出てきます。

PS > mise ls-remote java

絞り込みましょう。

PS > mise ls-remote java | Select-String temurin | Select-String 21

temurin-jre-11.0.21+9
temurin-jre-21.0.0+35.0.LTS
temurin-jre-21.0.1+12.1.LTS
temurin-jre-21.0.2+13.0.LTS
temurin-jre-21.0.3+9.0.LTS
temurin-jre-21.0.4+7.0.LTS
temurin-jre-21.0.5+11.0.LTS
temurin-jre-21.0.6+7.0.LTS
temurin-jre-21.0.7+6.0.LTS
temurin-jre-21.0.8+9.0.LTS
temurin-jre-21.0.9+10.0.LTS
temurin-11.0.21+9
temurin-21.0.0+35.0.LTS
temurin-21.0.1+12.1.LTS
temurin-21.0.2+13.0.LTS
temurin-21.0.3+9.0.LTS
temurin-21.0.4+7.0.LTS
temurin-21.0.5+11.0.LTS
temurin-21.0.6+7.0.LTS
temurin-21.0.7+6.0.LTS
temurin-21.0.8+9.0.LTS
temurin-21.0.9+10.0.LTS


PS > mise ls-remote java | Select-String temurin | Select-String 17

temurin-jre-11.0.17+8
temurin-jre-17.0.1+12
temurin-jre-17.0.2+8
temurin-jre-17.0.3+7
temurin-jre-17.0.4+8
temurin-jre-17.0.4+101
temurin-jre-17.0.5+8
temurin-jre-17.0.6+10
temurin-jre-17.0.7+7
temurin-jre-17.0.8+7
temurin-jre-17.0.8+101
temurin-jre-17.0.9+9.1
temurin-jre-17.0.10+7
temurin-jre-17.0.11+9
temurin-jre-17.0.12+7
temurin-jre-17.0.13+11
temurin-jre-17.0.14+7
temurin-jre-17.0.15+6
temurin-jre-17.0.16+8
temurin-jre-17.0.17+10
temurin-11.0.17+8
temurin-17.0.0+35
temurin-17.0.1+12
temurin-17.0.2+8
temurin-17.0.3+7
temurin-17.0.4+8
temurin-17.0.4+101
temurin-17.0.5+8
temurin-17.0.6+10
temurin-17.0.7+7
temurin-17.0.8+7
temurin-17.0.8+101
temurin-17.0.9+9.1
temurin-17.0.10+7
temurin-17.0.11+9
temurin-17.0.12+7
temurin-17.0.13+11
temurin-17.0.14+7
temurin-17.0.15+6
temurin-17.0.16+8
temurin-17.0.17+10


Java 21をインストール。

PS > mise use java@temurin-21.0.9+10.0.LTS
openjdk version "21.0.9" 2025-10-21 LTS
OpenJDK Runtime Environment Temurin-21.0.9+10 (build 21.0.9+10-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.9+10 (build 21.0.9+10-LTS, mixed mode, sharing)
mise C:\Users\user\.config\mise\config.toml tools: java@temurin-21.0.9+10.0.LTS

Java 17をインストール。このような表記だと、そのバージョンの最新版がインストールされるようです。

PS > mise use java@temurin-17
openjdk version "17.0.17" 2025-10-21
OpenJDK Runtime Environment Temurin-17.0.17+10 (build 17.0.17+10)
OpenJDK 64-Bit Server VM Temurin-17.0.17+10 (build 17.0.17+10, mixed mode, sharing)
mise C:\Users\user\.config\mise\config.toml tools: java@temurin-17.0.17+10

mise activateをしていれば、インストールしたコマンドが実行できます。

PS > java --version
openjdk 17.0.17 2025-10-21
OpenJDK Runtime Environment Temurin-17.0.17+10 (build 17.0.17+10)
OpenJDK 64-Bit Server VM Temurin-17.0.17+10 (build 17.0.17+10, mixed mode, sharing)

mise activateをしていなければ、認識されません。

PS > java --version
java : The term 'java' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path
 is correct and try again.
At line:1 char:1
+ java --version
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (java:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

グローバルのバージョンをJava 21に設定。

PS > mise use -g java@temurin-21
mise C:\Users\user\.config\mise\config.toml tools: java@temurin-21.0.9+10.0.LTS

次はApache Mavenをインストールしましょう。

こちらを見ればよいと思うのですが、どうやらApache Mavenは3つのインストール先があるようです。

こちらに従ってみましょう。

プラグインをインストール。

PS > mise plugin install maven

どうやらVfoxのものが使われるようです。

PS > mise plugin list -u
Plugin  Url                                             Ref  Sha
maven   https://github.com/mise-plugins/vfox-maven.git  HEAD 3b9e7c2

バージョンの確認方法はコアツールと同じみたいですね。

PS > mise ls-remote maven

Apache Maven 3.9.11をインストール。

PS > mise use -g maven@3.9.11
mise Downloading https://archive.apache.org/dist/maven/maven-3/3.9.11/binaries/apache-maven-3.9.11-bin.tar.gz
mise Verifying "C:\\Users\\user\\AppData\\Local\\mise\\downloads\\maven-3.9.11\\apache-maven-3.9.11-bin.tar.gz" checksum
mise Extracting "C:\\Users\\user\\AppData\\Local\\mise\\downloads\\maven-3.9.11\\apache-maven-3.9.11-bin.tar.gz" to "C:\\Users\\user\\AppData\\Local\\mise\\installs\\maven\\3.9.11"
mise C:\Users\user\.config\mise\config.toml tools: maven@3.9.11

よさそうです。

PS > mvn --version
Apache Maven 3.9.11 (3e54c93a704957b63ee3494413a2b544fd3d825b)
Maven home: C:\Users\user\AppData\Local\mise\installs\maven\3.9.11
Java version: 21.0.9, vendor: Eclipse Adoptium, runtime: C:\Users\user\AppData\Local\mise\installs\java\temurin-21.0.9+10.0.LTS
Default locale: ja_JP, platform encoding: UTF-8
OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"

アップデート

ツールの更新。

PS > mise upgrade

プラグインの更新。

PS > mise plugin update

mise本体の更新は、winget upgradeでよいでしょう。

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?