# 使用 Homebrew, MacPorts, pacman, scoop 安装 jenv

查看 jenv 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:jenv
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install jenv
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install jenv
```

  证据: MacPorts ports tree: java/jenv/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- pacman (92%):

```sh
sudo pacman -S jenv
```

  证据: Arch Linux sync databases: jenv from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

### Windows

- Scoop (92%):

```sh
scoop install extras/jenv
```

  证据: Scoop official bucket manifest trees: bucket/jenv.json from https://api.github.com/repos/ScoopInstaller/Extras/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:jenv
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/jenv>
- **版本:** 0.6.0
- **来源摘要:** Manage your Java environment
- **主页:** <https://github.com/jenv/jenv>
- **仓库:** <https://github.com/jenv/jenv>
- **许可证:** MIT
- **源码归档:** <https://github.com/jenv/jenv/archive/refs/tags/0.6.0.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- jenv (cli)
- jenv (别名)

## 安装行为

- post-install 钩子: 未定义
- 注意事项: To activate jenv, add the following to your shell profile e.g. ~/.profile or ~/.zshrc: export PATH="$HOME/.jenv/bin:$PATH" eval "$(jenv init -)"
- Bottle: 可用 于 all

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 0.6.0
- 本地数据: OK
- 上游仓库: https://github.com/jenv/jenv
- 检测到的最新版本: 0.6.0 (当前)
- 信息: No package-manager update timestamp was available.
## 项目历史与用法

jenv is a shell-oriented Java environment manager. Its README describes it as an updated fork of jenv adapted from rbenv, focused on switching Java versions and setting JAVA_HOME at global, directory-local, or per-shell scope without installing Java itself.

### 项目历史

The public GitHub repository for jenv was created in 2013. The project documentation names Gildas Cuisinier as maintainer and frames the repository as a continuation of an earlier beloved Java environment manager rather than a from-scratch package installer.

The release stream visible on GitHub shows a compact Unix shell tool that continued to receive maintenance releases through the 0.5.x and 0.6.x series. Release notes for 0.6.0 include fixes around shim behavior, shell support, install instructions, and the addition of a command for selecting a Java version for one command invocation.

### 采用历史

jenv became useful in Java shops because the JDK landscape is fragmented: Android, server, build, and legacy projects often require different Java majors on the same developer machine. Its README explicitly calls out Android tools using Java 8 while server applications use later releases, which explains its fit with project-local version files.

Homebrew, MacPorts, pacman, and Scoop package metadata in the input show that jenv escaped a single-source install workflow and became a cross-package-manager convenience for developers who already install JDKs through their platform tooling.

### 使用方式

A typical jenv workflow is to install the shell hooks, add already-installed JDK homes with `jenv add`, enable the export plugin when JAVA_HOME management is desired, and use `jenv global`, `jenv local`, or `jenv shell` to select the active version. `jenv local` writes a `.java-version` file in the working tree.

### 为什么软件包爱好者会关心

jenv matters to package-manager users because it deliberately does less than SDKMAN-style installers: it manages shims and environment selection, while Homebrew or the operating system installs Java. That separation makes it a small glue package with outsized value on machines that carry several vendor and versioned JDKs.

### 时间线

- 2013: Public GitHub repository created for jenv/jenv.
- 2020: GitHub release 0.5.3 appears in the release stream.
- 2025: GitHub release 0.6.0 records shim, install, and shell-support maintenance.

### Related projects

- The README explicitly traces jenv's style to rbenv. It also sits beside Homebrew, MacPorts, SDKMAN-style Java installers, and vendor OpenJDK packages rather than replacing them.

### 来源

- <https://api.github.com/repos/jenv/jenv>
- <https://formulae.brew.sh/formula/jenv>
- <https://github.com/jenv/jenv>
- <https://github.com/jenv/jenv/releases>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ./.java-version
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** jenv
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 其他软件包管理器记录

- pacman - jenv - 0.6.0-1: normalized package name match | Arch Linux sync databases: jenv from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Manage your Java environment | https://github.com/jenv/jenv
- MacPorts - jenv: normalized package name match | MacPorts ports tree: java/jenv/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - extras/jenv: normalized package name match | Scoop official bucket manifest trees: bucket/jenv.json from https://api.github.com/repos/ScoopInstaller/Extras/git/trees/master?recursive=1


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [anyenv](https://pkg.so/zh-hans/brew/anyenv/) - Shares pkgdb curated category or tags: cli, developer-tools, shell, version-manager.
- [vfox](https://pkg.so/zh-hans/brew/vfox/) - Shares pkgdb curated category or tags: cli, developer-tools, java, version-manager.
- [tofuenv](https://pkg.so/zh-hans/brew/tofuenv/) - Shares pkgdb curated category or tags: cli, developer-tools, shell, version-manager.
- [jabba](https://pkg.so/zh-hans/brew/jabba/) - Shares pkgdb curated category or tags: cli, developer-tools, java, version-manager.
- [scalaenv](https://pkg.so/zh-hans/brew/scalaenv/) - Shares pkgdb curated category or tags: cli, developer-tools, environment-manager, version-manager.
- [crash](https://pkg.so/zh-hans/brew/crash/) - Shares pkgdb curated category or tags: cli, developer-tools, java, shell.
- [ry](https://pkg.so/zh-hans/brew/ry/) - Shares pkgdb curated category or tags: cli, developer-tools, shell, version-manager.
- [maven-shell](https://pkg.so/zh-hans/brew/maven-shell/) - Shares pkgdb curated category or tags: cli, developer-tools, java, shell.
- [xcenv](https://pkg.so/zh-hans/brew/xcenv/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, environment, environment-manager.

## Combined YAML source

View the package source record on GitHub. [combined/jenv.yml](https://github.com/mxcl/pkgdb/blob/main/combined/jenv.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
