title: Compile a java file using docker with own path
body: <p>Hy. I'm trying to compile a .java file using docker. I read the files on docker's website, also I read these links:
  <p>
  <a href="https://docs.docker.com/userguide/dockervolumes/" rel="nofollow noreferrer">docker's website</a></p>
  
  <p><p>
  <a href="http://container-solutions.com/2014/12/understanding-volumes-docker/" rel="nofollow noreferrer">about volumes</a></p>
  
  <p><p>
  <a href="https://stackoverflow.com/questions/28622330/how-to-customize-the-docker-gcc-command-and-add-own-path-instead-of-usr-src/28660059?noredirect=1#comment45646021_28660059">and another question I had put up for gcc compiler</a>
  <p>
  I understood the concept for the gcc compiler since it doesn't create any extra file for compiling. 
  But the java one does. It creates a <code>Main.class</code> file on my /home directory if I use the following command and compile a file named <code>Main.java</code>
  <p>
  <code>sudo docker run --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp java:7 javac Main.java</code></p>
  
  <p><p>
  after learning from the above links I was able to successfully compile a java file with my own path using: 
  <p></p>
  
  <pre><code>docker run --rm -v /mypathhere/mycode.java:/mycode.java: java:7 javac mycode.java"
  </code></pre>
  
  <p><p>
  if there is any error it shows an error but if there isn't it just compiles and gives me no output, and that's justified because it creates a <code>Main.class</code> file.
  <p>
  My problem is that I am unable to find that <code>Main.class</code> file. I don't know where docker is creating it and I have zero understanding for it. Please help me out.</p>