public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mohan Embar <gnustuff@thisiscool.com>
To: tromey@redhat.com
Cc: GCJ-patches <java-patches@gcc.gnu.org>
Subject: Re: Patch: RFC: fix ProcessBuilder; windows help needed
Date: Wed, 21 Feb 2007 15:43:00 -0000	[thread overview]
Message-ID: <JD4Y53OMB9WVPGETS752UB03VOK65B6.45dc687f@parallels> (raw)
In-Reply-To: <IG53826KHB85KC7OMONTPMIX764Y.45d4994a@parallels>

[-- Attachment #1: Type: text/plain, Size: 728 bytes --]

Hi Tom,

I finally was able to build this after messing around with my paths
even more.

The attached testcase hangs on my machine on Linux with gcj, but
works with Sun Java. Would you be able to try this out on your end?
Once this works on Linux, I can move on to the Windows piece.
I would offer to troubleshoot this on Linux, but I'm really short on
time lately :(

1. Compile Test.java to Test.exe
2. Add the directory with Test.exe to your path.
3. Altenatively compile ProcessBuilderTest.java to a classfile
  and run with Sun Java (it works), or else compile ProcessBuilderTest.java
  to an executable with gcj, then try running the executable (it hangs).

-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/


[-- Attachment #2: Test.java --]
[-- Type: application/octet-stream, Size: 207 bytes --]

import java.io.InputStream;
import java.io.IOException;

public class Test
{
  public static void main(String[] args)
  {
    System.out.println("Hello");
    System.err.println("World!*");
  }
}

[-- Attachment #3: ProcessBuilderTest.java --]
[-- Type: application/octet-stream, Size: 572 bytes --]

import java.io.InputStream;
import java.io.IOException;

public class ProcessBuilderTest
{
  public static void main(String[] args)
  {
    try
    {
      ProcessBuilder p1 = new ProcessBuilder("Test.exe");
      p1.redirectErrorStream(true);
      Process p = p1.start();
      InputStream istr = p.getInputStream();
      int nch;
      while ((nch = istr.read()) != -1)
      {
        System.out.print((char) nch);
        if (nch == 42)
          break;
      }
    }
    catch (IOException e)
    {
      e.printStackTrace();
    }
  }
}

  parent reply	other threads:[~2007-02-21 15:43 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-03  0:24 Tom Tromey
2007-02-03 18:11 ` Mohan Embar
2007-02-04  9:47   ` Marco Trudel
2007-02-04 10:09   ` Mohan Embar
2007-02-05 21:05     ` Tom Tromey
2007-02-06 17:58       ` Mohan Embar
2007-02-07 16:13         ` Tom Tromey
2007-02-11 19:08 ` Mohan Embar
2007-02-12  0:12   ` Tom Tromey
2007-02-13  2:08     ` Mohan Embar
2007-02-13 18:04       ` Tom Tromey
2007-02-13 20:25         ` Tom Tromey
2007-02-13 22:01           ` Tom Tromey
2007-02-14  1:55             ` Mohan Embar
2007-02-14  2:01               ` Tom Tromey
2007-02-15 17:33               ` Mohan Embar
2007-02-15 17:35                 ` David Daney
2007-02-17  1:55                   ` Mohan Embar
2007-02-21 15:43                 ` Mohan Embar [this message]
2007-02-22  1:16                   ` Tom Tromey
2007-02-26 23:12                     ` Mohan Embar
2007-02-28 15:53                       ` Tom Tromey
2007-03-05 13:47                         ` Tom Tromey
2007-03-07  4:11                           ` class Character$UnicodeBlock$NameType; (was Re: Patch: RFC: fix ProcessBuilder; windows help needed) Mohan Embar
2007-03-07 14:37                             ` Tom Tromey
2007-03-07 14:55                               ` class Character$UnicodeBlock$NameType; Mohan Embar
2007-03-07 15:39                           ` Patch [MinGW]: ProcessBuilder and redirect Mohan Embar
2007-03-07 16:58                             ` Tom Tromey
     [not found] <KGA5WRQOB6SM2ZC8PLE4WR06DA72Q.45d226cf@parallels>
2007-02-13 22:25 ` Patch: RFC: fix ProcessBuilder; windows help needed Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=JD4Y53OMB9WVPGETS752UB03VOK65B6.45dc687f@parallels \
    --to=gnustuff@thisiscool.com \
    --cc=java-patches@gcc.gnu.org \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).