Obstacle to calling an external executable from within Java

Ok, I hit an error that just confused bejeebus from me. I am looking for ideas about what might be that I can research, because right now I have not received anything. This happens something like this:

I have a standalone Java application, because of which I sometimes need to circle the line-in volume of the computer on which it is running (WinXP machine). It does this by invoking a pair of external executable files (written in VB6 *) that can receive and install various component volumes. (They can work with Line-In, Mic, Wave, CD and the main volume control.)

In the field there are several hundred units running on hardware (Dell machines) that my company provided and controlled. At least a few dozen clients use this feature, and it works great - except for one instance.

For this one malfunctioning machine, it simply does not work. I look at the volume sliders when the application is running, and when the volume should fall, they remain in place. When I check the application log file, it does not throw any errors and seems to execute code that reduces the volume. When I run executables from the command line, they work fine.

I can not guarantee that this machine is 100% identical to all those who behave correctly, but for quite some time now we have been buying the same Dells line; at a minimum level it is very, very similar.

So, turning my confusion into a bullet list:

  • If I do something stupid in Java code (i.e. without flushing STDOUT / STDERR buffers), why is this a problem only on this computer?
  • If something is broken in the VB6 executables, why do they work on all other machines and on this machine from the command line?
  • If there is any hardware fuzziness on this computer, what oddity can lead to the fact that the volume control executable files will cease only when called from a Java application?

I am very confused. I do not like to be confused. Anyone have any suggestions that could lead to my enlightenment? **

- * - I know that I know, VB6, 1998, and they want their outdated proprietary error generator to return, etc. There was no my decision. But the code works. Usually.

- ** - .


Edit: -; . , - , - . , , , .

:

  • : , , .
  • Verbosity Logging, Java: , , , . . , , . .
  • , VB6: ; Java- , VB6-fu , , . , , , script, .
  • Window Event Viewer: . , .
  • PATH: ; Java- , - .

, ; , , .


: ... , ! , . , , .

, : " - , , , !" DaDaDom, , .

, . , , .

+3
3

: ? , , java VB.

+1

. , Java - . . - (. Runtime.exec()). , VB - , Java .


edit: Jakarta Commons Exec:

Java - . , , cmd.exe Windows , . JRE , Java SE 1.5 ProcessBuilder.

. J2SE 1.1-1.4 , System.getenv() .

, Runtime.exec() , . , . , , Apache .

+1

, ? , ""?

+1

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


All Articles