Execute a byte stream as a process in Java without writing to a file

Basically, I want to be able to execute a stream of bytes as a file without writing the specified bytes to the file.

I want to do this in a windows environment.

We can say that I want to create a file, copy the stream to a file and open the file as an executable file, but I want it to not have physical manifestations on the disk.

thanks

+4
source share
2 answers

This cannot be done using the standard Java API. You will have to rely on some of your own OS-specific implementations that do all this for you, or allow you to create some kind of RAM disk on which you can place your temporary data and execute it.

Perhaps related:

+3
source

Assuming your threading is a standard exe and you don’t want to name the whole virtualization environment, the short answer is no, because the internal addresses of the code will not be displayed.

Here's a more detailed answer:

process.start () embedded exe without extracting to the first C # file

+1
source

Source: https://habr.com/ru/post/1411702/


All Articles