Solved

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

Posted on 2006-11-15
5
176 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
AWS and Java and Rest - newbie question (Is this an authentication issue) 4 68
rhino JavaScript import, load 25 67
javap bin 2 27
javap not working 8 36
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
This video teaches viewers about errors in exception handling.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

910 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now