I am having a bit of trouble doing this. I am required to run a compiled .java file and redirect only stderr to a file called error. So the .java file is named javaProgram.java.This is what I have tried:java javaProgram 2> errorHowever when Icat errorit appears that there is stuff in there, even when I know for a fact that the specific .java file has no errors. Am I doing something wrong? All I want this error file to display is errors, not anything else.
How do I redirect only stderr?
bash;compiling;io redirection