java Command result to file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting java Command result to file
# 1  
Old 12-24-2008
java Command result to file

I would like to send results as log to a file on unix.
When I try to run following command, no command_result file occured. I can't see logs.
How can I put the results to a file with java command on unix ?

java -classpath . HelloWorld $parameter>command_result

Last edited by joeyg; 12-24-2008 at 11:28 AM.. Reason: Added word java to title; to highlight specific requirement
# 2  
Old 12-29-2008
The method is correct. Is the java program using System.out.println(...) ?
# 3  
Old 12-29-2008
Is dumping log messages buffered, in that case you might have to wait for some more time to see the messages in the log file or console.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Linux find command seems to not transmit all the result to the '-exec command'

Hello. From a script, a command for a test is use : find /home/user_install -maxdepth 1 -type f -newer /tmp/000_skel_file_deb ! -newer /tmp/000_skel_file_end -name '.bashrc' -o -name '.profile' -o -name '.gtkrc-2.0' -o -name '.i18n' -o -name '.inputrc' Tha command... (3 Replies)
Discussion started by: jcdole
3 Replies

2. Shell Programming and Scripting

Grep command giving different result for different users for same command

Hello, I am running below command as root user #nodetool cfstats tests | grep "Memtable switch count" Memtable switch count: 12 Where as when I try to run same command as another user it gives different result. #su -l zabbix -s /bin/bash -c "nodetool cfstats tests | grep "Memtable switch... (10 Replies)
Discussion started by: Pushpraj
10 Replies

3. UNIX for Advanced & Expert Users

Command to check java file in UNIX

Guys, i need to check whether java file can be executed in my current unix system or not. Can anyone please help me to get the correct command to check this. My Unix system is HP-UX. Thanks, (1 Reply)
Discussion started by: AraR87
1 Replies

4. AIX

Any file to differentiate JAVA JRE and JAVA JDK

Folks, Any idea of where can I find a specific file to differentiate JRE and Java JDK installed on AIX platform :cool: (3 Replies)
Discussion started by: dellcisco
3 Replies

5. Programming

Help: Run Java Command Line, Send Result to PHP?

EDIT: Sorry for the post, my good friend Google helped me out after some good searching! (0 Replies)
Discussion started by: tguillea
0 Replies

6. Shell Programming and Scripting

"Time" command and save result in a file.txt

Hi, I'am using "time" to check execution time of some script. Is there any possibility to save time command result into a file ? (2 Replies)
Discussion started by: Physix
2 Replies

7. Programming

how to get result from exe file using java

hello i have problem getting result from exe file using java i have exe file (inducer.exe) when i open in command line it i have to put two inputs function name file name i had make bat file which work OK until opening the program bat file contain inducer.exe //OK with this it open... (1 Reply)
Discussion started by: vip_a1
1 Replies

8. Shell Programming and Scripting

Command result to file

I would like to send results as log to a file on unix. When I try to run following command, no command_result file occured. I can't see logs. How can I put the results to a file with java command on unix ? java -classpath . HelloWorld $parameter>command_result (2 Replies)
Discussion started by: senem
2 Replies

9. Shell Programming and Scripting

Outputting formatted Result log file from old 30000 lines result log<help required>

Well I have a 3000 lines result log file that contains all the machine data when it does the testing... It has 3 different section that i am intrsted in 1) starting with "20071126 11:11:11 Machine Header 1" 1000 lines... "End machine header 1" 2) starting with "20071126 12:12:12 Machine... (5 Replies)
Discussion started by: vikas.iet
5 Replies
Login or Register to Ask a Question