Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2006-11-15
5
Medium Priority
?
183 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 500 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

886 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