Is it possible to create a "virtual" file in Java and to pass it as parameter to a Process/ProcessBuilder?
Let's say I want to call an external .exe file (Windows) with a parameter arg
. arg
must be a file on the hard disk. Consider following code as example:
Process p = Runtime.getRuntime().exec("someProgram.exe -file " + arg)
So, is it possible to create arg
as "virtual" file and pass it in such way to the external process in Java? If so, how could I implement it?
I would prefer to avoid writing the file to the hard disk at first because HDD I/O is quite slow.