Win a copy of Event Streams in Action this week in the Java in General forum!

arjun rampal

Ranch Hand
+ Follow
since Jul 08, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by arjun rampal

if i stop system.out in application then how can i give looging information without using log packages in sepearte file?
12 years ago
I have a Application running on websphere in which logging faciltites are not used as its small application.
so We have used System.out.println for logging information.
now issue is application server logging information and application "system.out.println" generating to same file System.outlog. which i dont want .I want application "System.out.prinln" should go to some other file and aplication login should go to System.outlog.is it possible if yes how?
12 years ago
I have file which is reading from file and deleting it.
delete is done by static method.
now i need to do like this if file is empty it should throw exception and delte the file.
so i added else like this
else{

throw new empty("Empty");
}
but it is only thorowing exception not deleting file.as that static code is unreachable after throwing exception.
any idea
12 years ago
Hi I have a web application containing some system.out.println.It will be accessed by multiple users.
now my question is if multiple users access the application that system.out will be loogged in jvm log for every user?
12 years ago
Hi
I have a web application which contains action classes having exception.
Now my question is whether this excpetion (printing stackTrace in Systemout.log) will print stacktrace on Systemout.log file also?
2)When i start the application it gives some trace after end display Environment like loading webmodule etc etc.
wheere this information is stored in websphere folder

regards
12 years ago
finally thanks
12 years ago
Hi ernest thanks for your patience.
leave google search for window i will do that
just let me know one thing

I am using cron to run that jar so script should be like that
/usr/java/j2sdk1.4.2_12/bin/java -jar /home/wasadmin/b.jar
> a.txt 2>&1

is enough? and whether every time jar will run it will overwrite the a.txt or will appned to previous run.
As i want append not overwrite
12 years ago
Almost reached to solution with one issue.
on window if i give file name as same it gives error "process can not access file because it is used by another process."
but if i use difernt file name it works with exception save in another file and stdout in another file.
for linux are you sure it wont ask for second file name?as for same file name it is giving error on windows

java -jar ar.jar > a.txt 2>&1

On Windows XP, I'm not positive, but I believe you would just say

java -jar ar.jar > a.txt 2>a.txt
12 years ago
I am developing and testing on windows and deploying on red hat linux so both i need.
for windows I am using java ar.jar>c:/a.txt. for linux i dont know how to write command for saving on file

And I need to show both exception and system.out in a.txt
12 years ago
Hi but it is not writing exceptions.
only system.out.println is written.
12 years ago
Hi
running application with jdk
whether console output for application is saved anywhere inside jdk folders.
if No how it can be save to some file .

regards
12 years ago
Hi how to rectify this
regards
Hi this is third file to get it
if (res.getres()){
System.out.println("got it")

else{
System.out.println(" not got it")
}
where res.getres returning boolean value
Hi I have a file which if exists should print "got it" else it should print "not got it".Gettin boolean value through for this through res.getres().Now follwoing are two files.Issue is when file is there i get the correct message but when file is not there I am not getting any messgae.




[HENRY: Added code tags]
[ October 29, 2006: Message edited by: Henry Wong ]
Hi need to stack trace of java exception to log file .how it can done.
simple messages i am able to send in log file but how to send complete stack trace of exception
12 years ago