Click here to Skip to main content
15,867,568 members
Home / Discussions / C#
   

C#

 
QuestionRe: C# Execution of Java program Pin
Jerry W. Manweiler, Ph.D.29-Nov-11 9:59
Jerry W. Manweiler, Ph.D.29-Nov-11 9:59 
AnswerRe: C# Execution of Java program Pin
Not Active29-Nov-11 10:05
mentorNot Active29-Nov-11 10:05 
GeneralRe: C# Execution of Java program Pin
Jerry W. Manweiler, Ph.D.29-Nov-11 10:06
Jerry W. Manweiler, Ph.D.29-Nov-11 10:06 
GeneralRe: C# Execution of Java program Pin
Not Active29-Nov-11 10:30
mentorNot Active29-Nov-11 10:30 
GeneralRe: C# Execution of Java program Pin
Jerry W. Manweiler, Ph.D.29-Nov-11 10:32
Jerry W. Manweiler, Ph.D.29-Nov-11 10:32 
AnswerRe: C# Execution of Java program Pin
Alan Balkany2-Dec-11 8:51
Alan Balkany2-Dec-11 8:51 
AnswerRe: C# Execution of Java program Pin
jschell29-Nov-11 10:57
jschell29-Nov-11 10:57 
GeneralRe: C# Execution of Java program Pin
Jerry W. Manweiler, Ph.D.29-Nov-11 11:40
Jerry W. Manweiler, Ph.D.29-Nov-11 11:40 
I am running the 1st option that you indicate and provide the java application (java.exe) and the class that I am executing as one of the input parameters.

Regardless of the above,
the Process dies by killing all associated running processes including the IDE.

The entire process (java class parms) does run just fine if I do it outside my code.

So again the question is what in the code am I doing incorrectly or is it possible that you or others have run into this problem and figured out what is really going on.

And to be very explicit - here is the actual code that I'm using:
C#
DirectoryInfo di = new DirectoryInfo(path);
FileInfo[] files = di.GetFiles("*.xml");
foreach (FileInfo file in files)
{
    Text = "Converting: " + file.Name;

    String[] parms = new String[1];
    parms[0] = file.FullName;

    ProcessStartInfo psi = new ProcessStartInfo();
    psi.CreateNoWindow = true;
    psi.UseShellExecute = false;
    psi.RedirectStandardError = true;
    psi.RedirectStandardOutput = true;
    psi.FileName = @"\\NASA\GSFC\CDF\CDFML2CDF.exe";
    psi.Arguments = file.FullName;
    psi.WindowStyle = ProcessWindowStyle.Hidden;

    try
    {
        // Start the process with the info we specified.
        // Call WaitForExit and then the using statement will close.
        using (Process exeProcess = Process.Start(psi))
        {
            exeProcess.WaitForExit();
            Text = "    Processing successful for file = " + file.Name;
            Text = " ---- Process output Begin---";
            Text = exeProcess.StandardOutput.ReadToEnd();
            Text = " ---- Process output End---";
        }
    }
    catch
    {
        Text = "    Processing failed for file = " + file.Name;
    }
}


when it executes
C#
Process exeProcess = Process.Start(psi)

The IDE and all threads die.
There is nothing logged in the System or application event logs.
There is nothing output to the system - IT JUST CRASHES the IDE and Threads.

Do you have any helpful ideas or suggestions?
Jerry W. Manweiler, Ph.D.
Fundamental Technologies, LLC

GeneralRe: C# Execution of Java program Pin
Richard Andrew x6429-Nov-11 14:16
professionalRichard Andrew x6429-Nov-11 14:16 
GeneralRe: C# Execution of Java program Pin
Richard Andrew x6429-Nov-11 14:24
professionalRichard Andrew x6429-Nov-11 14:24 
GeneralRe: C# Execution of Java program Pin
Pete O'Hanlon30-Nov-11 0:27
subeditorPete O'Hanlon30-Nov-11 0:27 
GeneralRe: C# Execution of Java program Pin
jschell30-Nov-11 10:13
jschell30-Nov-11 10:13 
QuestionLinq To Sql - Update Hierarchical Data Pin
Kevin Marois29-Nov-11 7:01
professionalKevin Marois29-Nov-11 7:01 
AnswerRe: Linq To Sql - Update Hierarchical Data Pin
Not Active29-Nov-11 8:31
mentorNot Active29-Nov-11 8:31 
QuestionChecking or Unchecking Based on Some Value Pin
AmbiguousName28-Nov-11 20:28
AmbiguousName28-Nov-11 20:28 
AnswerRe: Checking or Unchecking Based on Some Value Pin
Wayne Gaylard28-Nov-11 20:48
professionalWayne Gaylard28-Nov-11 20:48 
GeneralRe: Checking or Unchecking Based on Some Value Pin
DaveyM6928-Nov-11 21:35
professionalDaveyM6928-Nov-11 21:35 
GeneralRe: Checking or Unchecking Based on Some Value Pin
Wayne Gaylard28-Nov-11 21:41
professionalWayne Gaylard28-Nov-11 21:41 
GeneralRe: Checking or Unchecking Based on Some Value Pin
AmbiguousName28-Nov-11 22:48
AmbiguousName28-Nov-11 22:48 
GeneralRe: Checking or Unchecking Based on Some Value Pin
Wayne Gaylard28-Nov-11 22:56
professionalWayne Gaylard28-Nov-11 22:56 
GeneralRe: Checking or Unchecking Based on Some Value Pin
AmbiguousName28-Nov-11 23:08
AmbiguousName28-Nov-11 23:08 
GeneralRe: Checking or Unchecking Based on Some Value Pin
Wayne Gaylard28-Nov-11 23:13
professionalWayne Gaylard28-Nov-11 23:13 
GeneralRe: Checking or Unchecking Based on Some Value Pin
AmbiguousName28-Nov-11 23:22
AmbiguousName28-Nov-11 23:22 
Questioncall C++ dll from C# without name mangling Pin
Paulraj G28-Nov-11 17:57
Paulraj G28-Nov-11 17:57 
AnswerRe: call C++ dll from C# without name mangling Pin
Wayne Gaylard28-Nov-11 18:03
professionalWayne Gaylard28-Nov-11 18:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.