Solved

why would the output to the screen be different than output that is captured?

Posted on 2006-11-15
5
177 Views
Last Modified: 2012-05-05
i am using a 3rd party java app, so i dont know the internal workings of it.  i was trying to launch the app from a webservice powered by .NET, but for some reason, it doesnt work (although the app runs fine when launched manually).  one thing i noticed eventually, is that when you try to capture the out put (for instance using "> soemthing.txt" in DOS, the output that is captured is completely different than the output that the java app prints to the screen.  any ideas on how that could be possible?
0
Comment
Question by:trip008vk
  • 2
  • 2
5 Comments
 
LVL 92

Expert Comment

by:objects
ID: 17951244
is the java app displaying output from stdout?
0
 

Author Comment

by:trip008vk
ID: 17951285
i'm not sure.  in know nothing about the internal workings of it.  when i run it from the dos prompt, it prints out several lines to the command window.  when i redirect the output to a text file, it only writes one line (and this line is different form all the others!)
0
 
LVL 92

Expert Comment

by:objects
ID: 17951315
thats very strange, no idea why that would be happening.
0
 
LVL 6

Accepted Solution

by:
SamsonChung earned 125 total points
ID: 17956667
the output of the Java prog is sending to stderr.

what you want is the file redirected one.

not the one on your screen.

0
 
LVL 6

Expert Comment

by:SamsonChung
ID: 17956674
or, the author/designer of the program is smart enough to handle '> something.txt' in command line java.

try sending that to a linux system and see if the results are similar



0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
The viewer will learn how to implement Singleton Design Pattern in Java.

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question