0

I have a .exe file, which produces certain files when made to run : The window appearing after executing the .exe file

The files produced are WatchDataTest, ngrtgs.test, shubhangi, slatey (as they appear in the image)

I want to run the .exe file through a separate Java Program and obtain reference to the above files. How can this be done?

My point of view: I think, obtaining an OutputStream(wrapped by ObjectOutputStream) on the Process object of this executable can be used to read the objects (files, in this case). However, I am not sure in what way does this executable provides reference to the files produced. Other than that, I have a confusion whether the GUI display is part of the output. I mean does the OutputStream of this executable include the GUI object, which displays on the screen? If not, what all is the output of this .exe?(Pretty confusion here)

jigsawmnc
  • 444
  • 5
  • 15

1 Answers1

1

The .exe file calls your OS native functions to create those files. You cannot catch that from Java.

If you want to read the content of those files from Java, find them in the directory structure, and open them for reading with the normal Java File I/O API.

I think you want to access those certificates, right? Most likely they're not stored in separate files, but in one file called keystore. In this case I recommend to use Java PKI API or tools to manage your keystore.

gaborsch
  • 15,408
  • 6
  • 37
  • 48