Created
September 5, 2016 19:00
-
-
Save koduki/8fb43085f185a17ede68e4e41099dd83 to your computer and use it in GitHub Desktop.
Dockerを使ってJava9を超高速に試す ref: http://qiita.com/koduki/items/c4fb0276cc0d9a1a08c0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ docker run marvambass/oracle-java9 java -version | |
java version "9-ea" | |
Java(TM) SE Runtime Environment (build 9-ea+130) | |
Java HotSpot(TM) 64-Bit Server VM (build 9-ea+130, mixed mode) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat > Main.java | |
public class Main { | |
public static void main(String[] args){ | |
System.out.println("Hello java9 on Docker"); | |
} | |
} | |
$ ls Main.java | |
Main.java |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ docker run -v `pwd`:/tmp -w "/tmp" marvambass/oracle-java9 javac Main.java | |
$ ls -l Main.* | |
-rw-r--r-- 1 koduki 197609 423 9月 6 03:47 Main.class | |
-rw-r--r-- 1 koduki 197609 117 9月 6 03:47 Main.java |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ docker run -v `pwd`:/tmp -w "/tmp" marvambass/oracle-java9 java Main | |
Hello java9 on Docker |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ docker run -it marvambass/oracle-java9 jshell | |
Sep 05, 2016 6:52:03 PM java.util.prefs.FileSystemPreferences$1 run | |
INFO: Created user preferences directory. | |
| Welcome to JShell -- Version 9-ea | |
| For an introduction type: /help intro | |
jshell> System.out.println("Hello JShell!") | |
Hello JShell! | |
jshell> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment