nationavon
MIS
Here's a weird one. I am running a program called Pad.exe from my Application. Pad.exe is a simple DOS app that pads each line in a file with a specified length. the following is the line from my Java App:
Process p = Runtime.getRuntime().exec(p_program + " 749 " + i_directory + "\\" + txtfile + " " + o_directory + "\\" + txtfile);
p_program is Pad.exe
749 is the pad length
i_directory is the input directory
o_directory is the output directory
txtfile is the file to be padded
Here is where it gets weird. If I run my Java Application I get a windows pop-up box with the following error:
C:\WINDOWS\system32\ntvdm.exe.
Error while setting up enviroment for the application. Choose 'Close' to terminate application.
After I close the error window I can go to the command line and run the Pad.exe program at the DOS prompt. After I run Pad.exe at the DOS prompt I can run my Java Application from the the same command line and it runs successfully. It is almost like when I manually run Pad.exe from the comand line it is setting up the enviroment. I don't see any changes to the enviroment variables. Can anyone think of something I can do in my Java App to get the environment setup.
Nathan
Process p = Runtime.getRuntime().exec(p_program + " 749 " + i_directory + "\\" + txtfile + " " + o_directory + "\\" + txtfile);
p_program is Pad.exe
749 is the pad length
i_directory is the input directory
o_directory is the output directory
txtfile is the file to be padded
Here is where it gets weird. If I run my Java Application I get a windows pop-up box with the following error:
C:\WINDOWS\system32\ntvdm.exe.
Error while setting up enviroment for the application. Choose 'Close' to terminate application.
After I close the error window I can go to the command line and run the Pad.exe program at the DOS prompt. After I run Pad.exe at the DOS prompt I can run my Java Application from the the same command line and it runs successfully. It is almost like when I manually run Pad.exe from the comand line it is setting up the enviroment. I don't see any changes to the enviroment variables. Can anyone think of something I can do in my Java App to get the environment setup.
Nathan