Building on the answer to your other question:
Example
So you have two docker containers with a need to share a file system? Assuming your java application is containerized, use it to create a persistent data container:
$ docker create -v /data --name mydata mydockerimage
Run your containerized programs using this data container
$ docker run -it --rm --volumes-from mydata mydockerimage create "/data/myfile.csv"
$ docker run -it --rm --volumes-from mydata mydockerimage read "/data/myfile.csv"
It's possible to pull files out of the data container:
$ docker cp mydata:/data/myfile.csv myfile.csv
Finally you'll want to cleanup the data container eventually
$ docker rm -v mydata
Update
You have not indicated how you're building or using your java program. I have assumed it's an executable jar that can either write or read a CSV file:
java -jar myjar.jar create "/data/myfile.csv"
java -jar myjar.jar read "/data/myfile.csv"
For an example of how to build such a container see:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…