Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2006-11-15
5
Medium Priority
?
182 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Suggested Courses

718 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