Visit Our UNIX and Linux User Community


Simple redirect (or so I thought)


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Simple redirect (or so I thought)
# 1  
Old 02-21-2002
Simple redirect (or so I thought)

It should be real easy. All that I want to do is to redirect the error messages from a java compiler to an external file, so that I can read all of my error messages, not just the last ones that fit on my screen. In theory, it should go like this:

javac MyFile.java > errors.log

So, what am I doing wrong? It will create the error.log file, but won't direct anything into it. Suggestions? Am I just being stupid? I tried out a few other methods like tee, and nothing was happy.

Thanks
# 2  
Old 02-21-2002
Usually, the errors output go to (wait for it...) standard error, or stderr. This file descriptor number is "2". So, you should be able to run it like this:
javac MyFile.java 2>error.log
 

Previous Thread | Next Thread
Test Your Knowledge in Computers #494
Difficulty: Easy
A block of code is a section of code that has been logically grouped together.
True or False?

3 More Discussions You Might Find Interesting

1. Web Development

Simple Vue.js Component to Redirect to External Web Page Using Vue Router

Vue Router has some quirks and on of the quirks is that it is not reliable when adding external links using the vue-router library. After struggling with many solutions, I have found that creating a simple Vue.js component like this one seems to work the best (so far): Component Example: ... (0 Replies)
Discussion started by: Neo
0 Replies

2. UNIX for Dummies Questions & Answers

| Help | unix | grep | sort | uniq - Different output from what I thought would be the same

Hello, I'm having an consistency issue.... grep 'a' /usr/share/dict/words 1) This will highlight every 'a' in each word. grep 'a\{1,\}' /usr/share/dict/words 2) This will highlight 'a' if it occurs at least once in a sequence. So every 'a'. Output of 1) I would... (1 Reply)
Discussion started by: MykC
1 Replies

3. Shell Programming and Scripting

I thought I asked the question before but I haven't sorry

:D could any one answer my previous question... just looked through logg and found no such question that I had asked.. please any input would help \.. :confused: (2 Replies)
Discussion started by: moxxx68
2 Replies

Featured Tech Videos