java9系列(二)docker运行java9
序
本文介绍下如何在docker运行java9
镜像
docker pull openjdk:9-jdk
启动
docker run -it openjdk:9-jdk /bin/jshell
然后就可以正常使用jshell了,比如
Sep 22, 2017 2:16:12 AM java.util.prefs.FileSystemPreferences$1 run INFO: Created user preferences directory. | Welcome to JShell -- Version 9-Debian | For an introduction type: /help intro jshell> Arrays.asList(1,2,3,4).stream().limit(3).forEach(e -> System.out.print(e)) 123
退出
jshell> /exit | Goodbye
查看此镜像的java版本
docker run -it openjdk:9-jdk /bin/bash root@44d1d18351a8:/# java -version openjdk version "9-Debian" OpenJDK Runtime Environment (build 9-Debian+0-9b181-4) OpenJDK 64-Bit Server VM (build 9-Debian+0-9b181-4, mixed mode)
doc
相关推荐
王道革 2020-11-25
bwyyziq 2020-11-22
pigsmall 2020-11-19
changecan 2020-11-19
helloWorldAndYou 2020-11-16
nginxs 2020-11-14
红石丶 2020-11-13
WanKaShing 2020-11-12
yangkang 2020-11-12
滴水穿石点石成金 2020-11-12
张荣珍 2020-11-12
wuxunanjing 2020-11-11
魅惑青花瓷 2020-11-11
lihongtai 2020-11-09
yangkang 2020-11-09
worldsnow 2020-11-06
MichaelJScofield 2020-11-06
TaoTaoFu 2020-11-06