When starting from the command line, you can try >, that is:
java -Xprof YourClass > output.txt
Not sure what kind of profiling you are doing and what the nature of your application is, but you might consider a slightly more friendly profiler like Eclipse TPTP or JProfiler .
source
share