Sign inSign up

lhcpig/java

By lhcpig

Updated over 10 years ago

java docker image

Image
0

2.3K

lhcpig/java repository overview

java environment that base on centos7

compile a java file

$ docker run --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp java javac Main.java

This will add your current directory as a volume to the container, set the working directory to the volume, and run the command javac Main.java which will tell Java to compile the code in Main.java and output the Java class file to Main.class.

Tag summary

Content type

Image

Digest

Size

121.9 MB

Last updated

over 10 years ago

docker pull lhcpig/java