jenv: the Java enVironment Manager
=======================================
[![Join the chat at https://gitter.im/linux-china/jenv](https://badges.gitter.im/linux-china/jenv.svg)](https://gitter.im/linux-china/jenv?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
jenv is a tool for managing parallel Versions of Java Development Kits on any system, such as Linux, Mac and Windows.
It provides a convenient command line interface for installing, switching, removing and listing candidates.
If you have any problem, please join gitter room: https://gitter.im/linux-china/jenv
## Why jenv
* Easy to manage Java versions, such as 1.6, 1.7 and 1.8
* Easy to install Java related tools, such as ant, maven, tomcat etc.
* Easy to manage candidate versions. It supports installing new version, reinstalling or uninstalling old ones
* Directory is standard and friendly to IDE
* Easy to be extended - you can setup your own jenv in your company to manage development environment
* Easy to backup your env.
* Bash completion support. Use TAB to complete command name, candidate name and version
* Multi OS support, such as Mac, Linux and Windows(Cygwin)
## Installat jenv
Open your favourite terminal and enter the following:
```
$ curl -L -s get.jenv.mvnsearch.org | bash
```
If the environment needs tweaking for jenv to be installed, the installer will prompt you accordingly and ask you to restart.
## Install Java
Because I cannot redistribute Java SDK, so you should download it from http://www.oracle.com/technetwork/java/javase/downloads/index.html
and install by yourself. After installation, please execute the following command:
```
$ mkdir -p $HOME/.jenv/candidates/java
$ ln -s /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/home $HOME/.jenv/candidates/java/1.8.0_112
$ jenv default java 1.8.0_112
```
for Mac user, after you install JDK from dmg file, please execute:
$ jenv install java 1.8.0_112 system
and jenv will link the Java version automatically.
You can also install Java by http url:
$ jenv install java 1.8.0_112 http://xxxx.com/java/java-1.8.0_112.zip
## Install candidates
Firstly, view all available candidates:
$ jenv all
Secondly, list available versions for the candidate, such as maven candidate:
$ jenv ls maven
Finally, install the candidate with the specified version:
$ jenv install maven 3.5.3
In your terminal, type `mvn --version` to check the installation.
If you want to list all installed candidates, use the following command:
$ jenv ls
For Docker user, your can use silent mode in your Dockerfile as following:
$ JENV_AUTO=true; jenv install maven 3.5.3
### Update repository
The candidate's versions are maintained in the central repository. To keep updated with central repository, please use:
$ jenv repo update
### Clonable development environments with jenv
You can clone your jenv between multiple hosts.
* clone your local jenv to remote host: `jenv clone user@remote-host`
* clone your local candidate to remote host: `jenv clone candidate version user@remote-host`
* clone candidate from remote host: `jenv clone user@remote-host canidate version`
## Other Commands
* `uninstall`: Uninstall the candidate with the version specified, such as `jenv uninstall maven 3.0.4`
* `reinstall`: Reinstall the candidate with the version specified, such as `jenv reinstall maven 3.0.5`
* `use`: Use the candidate with the version specified, such as `jenv use maven 3.0.4`
* `which`: Check which version for candidate
* `pause`: Pause candidate usage
* `exe`: Execute script under candidate, such as `jenv execute tomcat startup.sh` or `jenv execute tomee startup.sh`
* `default`: Make the version as default, such as `jenv default maven 3.0.4`
* `cd`: Change directory to candidate install directory, such as `jenv cd groovy`
* `show`: Display the candidate's detailed information
* `requirements`: Display jenv requirements
## jenvrc support
jenvrc is jenv setup file which contains candidate and the version as following:
```
java=1.8.0_112
maven=3.5.3
```
After you enter this directory, jenv will setup environment automatically.
Now You can use jenvrc to setup Java environment for each of your individual projects.
You can use jenv init to generate jenvrc file.
$jenv init
Note: Line started with # means line comment.
### Script Hook
All the scripts are under candidate home and invoked by jenv automatically.
* autorun.sh: executed to load current candidate
* post-install.sh: executed after install
* uninstall.sh: executed before uninstall
## Install local candidates
If you want to add custom candidate into jenv, please create candidates_local under $HOME/.jenv/db/ directory and input candidate name.
$jenv add spike 0.0.1
$jenv install spike 0.0.1 [email protected]:linux-china/groovy_scripts.git
Then you can install candidate from git repository, and you can update candidate by following command:
$jenv update spike
If the candidate is absent, jenv will update all git or svn based candidates.
$jenv update
Update all git or svn based candidates.
### jenv with Docker Executable Images
If you want to integrate jenv with Docker Executable Images, you can use following steps:
* create a repository in github
* create autorun.sh file to create functions for commands in Docker images:
```
mvn() {
docker run --rm \
-v $(pwd):/project \
-w /project \
--entrypoint mvn \
maven:3.5.0-jdk-8 $*
}
```
* install candidate from github
* execute shell functions in autorun.sh
## How to update jenv
Please use selfupdate command to get last version and candidate repository.
```
$ jenv selfupdate
```
## jenv IntelliJ IDEA plugin
With jenv IDEA plugin, you don't need to setup Java SDK, Maven, and so on, and jenv IDEA plugin can scan jenv directory
and setup the settings in IDEA automatically. Please visit http://plugins.jetbrains.com/plugin/?idea&pluginId=7229
## Reference
* Shell Code Style: http://google-styleguide.googlecode.com/svn/trunk/shell.xml
### TODO
* jenv outdated: display outdated candidates
* broadcast: broadcast message
没有合适的资源?快使用搜索试试~ 我知道了~
一个可靠、通用、快速且灵活的 Java 日志记录框架
共114个文件
txt:67个
sh:37个
gitignore:1个
需积分: 1 0 下载量 175 浏览量
2023-10-26
15:19:40
上传
评论
收藏 220KB ZIP 举报
温馨提示
Java EE 和 Jakarta EE 版本 鉴于下游用户可能在其项目中依赖 Java EE(在 javax 命名空间中)或 Jakarta EE(在 jakarta 命名空间中),因此 logback 支持这两种 EE 替代方案被认为很重要。 版本 1.3.x 支持 Java EE,而版本 1.4.x 支持 Jakarta EE。 这两个版本的功能相同。 1.3.x 和 1.4.x 系列都需要 SLF4J 2.0.x 或更高版本。 1.3.x 系列在运行时需要 Java 8。如果您希望从源代码构建 logback,您将需要 Java 9。 1.4.x 系列在构建时和运行时需要 Java 11。
资源推荐
资源详情
资源评论
收起资源包目录
一个可靠、通用、快速且灵活的 Java 日志记录框架 (114个子文件)
candidates 475B
.gitignore 120B
build.gradle 2KB
gradlew 5KB
config.groovy 231B
gradle-wrapper.jar 46KB
WechatIMG6903.jpg 123KB
LICENSE 10KB
README.md 6KB
gradle-wrapper.properties 229B
jenv-common.sh 9KB
jenv-install.sh 7KB
jenv-init.sh 7KB
install.sh 7KB
jenv-clone.sh 4KB
bash-completion.sh 3KB
jenv-repo.sh 3KB
zsh-completion.sh 3KB
jenv-list.sh 3KB
jenv-update.sh 3KB
jenv-main.sh 3KB
jenv-utils.sh 3KB
add-hook.sh 2KB
jenv-add.sh 2KB
selfupdate.sh 2KB
jenv-use.sh 2KB
jenv-uninstall.sh 2KB
jenv-config.sh 2KB
jenv-execute.sh 2KB
jenv-pause.sh 1KB
jenv-load.sh 1KB
jenv-reinstall.sh 1KB
jenv-help.sh 1KB
jenv-default.sh 1KB
jenv-which.sh 1KB
jenv-cd.sh 1KB
jenv-requirements.sh 1KB
jenv-candidates.sh 935B
jenv-show.sh 882B
jenv-init.sh 874B
jenv-clean.sh 831B
jenv-broadcast.sh 822B
jenv-selfupdate.sh 807B
completion.sh 777B
jenv-reset.sh 760B
jenv-version.sh 733B
local_install.sh 64B
candidates.txt 5KB
vertx.txt 47B
grails.txt 47B
gradle.txt 46B
java.txt 44B
jetty.txt 36B
hbase.txt 36B
groovy.txt 35B
tomcat.txt 34B
elasticsearch.txt 28B
url.txt 25B
maven.txt 24B
cassandra.txt 24B
virgo.txt 24B
name.txt 23B
activemq.txt 23B
clojure.txt 23B
jruby.txt 23B
storm.txt 23B
ant.txt 23B
play.txt 23B
pig.txt 19B
scala.txt 19B
hive.txt 18B
hadoop.txt 18B
liquibase.txt 17B
jboss.txt 17B
gae.txt 17B
roo.txt 17B
griffon.txt 17B
resin.txt 13B
sbt.txt 13B
housemd.txt 11B
gwt.txt 11B
solr.txt 11B
zookeeper.txt 11B
jrockit.txt 10B
neo4j.txt 9B
ofbiz.txt 8B
h2.txt 7B
glassfish.txt 7B
antlr.txt 7B
buildr.txt 6B
jad.txt 6B
quercus.txt 6B
torquebox.txt 5B
leiningen.txt 5B
squirrelsql.txt 5B
felix.txt 5B
equinox.txt 5B
tomee.txt 5B
mat.txt 5B
android.txt 5B
共 114 条
- 1
- 2
资源评论
技术小羊
- 粉丝: 808
- 资源: 114
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于C+++OPENCV的全景图像拼接源码(课程设计)
- 基于Python+OpenCV对多张图片进行全景图像拼接,消除鬼影,消除裂缝+源代码+文档说明+界面截图(高分课程设计)
- 基于C++实现的全景图像拼接源码(课程设计)
- 基于SIFT特征点提取和RASIC算法实现全景图像拼接python源码+文档说明+界面截图+详细注释(95分以上课程大作业)
- 基于matlab实现眼部判别的疲劳检测系统+源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
- 基于Matlab的异常姿势识别系统+源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
- 隐藏文件展示工具,用来展示被病毒隐藏的文件
- 基于Matlab的图像分割系统+源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
- 基于MATLAB指纹门禁GUI设计源码+源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
- 基于Matlab的仪表指数识别系统霍夫曼变换+源代码+全部数据+文档说明+详细注释+使用说明+截图(高分课程设计)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功