-
Process and streams
Hello guys,
what i really d'like to do is to take the outputstream from a process and print it to a string. i 'm foremly new in java and i have several problems...
Thanks in advance!
This is my code:
Process calc_proc;
Runtime calc = Runtime.getRuntime();
String command[]= {"java","-version"};
calc_proc = calc.exec(command);
StringBuffer strb = new StringBuffer();
String outb = calc_proc.getOutputStream().toString();
//DataInputStream inStream = new DataInputStream (calc_proc.getOutputStream());
//String outB = new StringBuffer(100).calc_proc.getOutputStream().toString();
out.println(outb);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks