I have this code which copy the executable file into byte array.
//winmine.exe
Path path = Paths.get("winmine.exe");
byte[] bin = Files.readAllBytes(path);
I want execute dinamically the array without use the file. By example I need something like this:
Runtime app = Runtime.getRuntime();
String currentDir = new File(".").getAbsolutePath();
Process p = app.exec_WRAP_BINARY(bin); //Not exixts
The purpose of that is prevent the user from accessing the file winmine.exe
Update: I'm sure this must be possible somehow. If we consider that is an execution: First, it read a file and then it load to memory it completely... I don't see because it can't do this separately.