File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes I/O and Streams and the fly likes File-logging program working in Windows, but not in Linux Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "File-logging program working in Windows, but not in Linux" Watch "File-logging program working in Windows, but not in Linux" New topic
Author

File-logging program working in Windows, but not in Linux

Denise Advincula
Ranch Hand

Joined: Jan 01, 2007
Posts: 163
Hi,

I have an application which writes every processing tasks to a file.

The application is in an executable jar format. In windows, it's working perfectly and the log file is also being successfully written unto.
When I deployed (copy-paste) the jar to linux, and run it by java -jar command, it still worked fine. However, the logging functionality didn't work.

I'm looking at folder permissions so I changed the folder permissions where the log file is supposed to land. I used the System.getProperty(user.dir) as the folder where the log file will be stored. There are no exceptions being thrown as well so I don't know where the error is coming from...

This and all others, I couldn't figure out why log file isn't being created.

I hope you can help me out here. Thanks in advance!


SCJP/OCPJP 6 | SCWCD/OCPJWCD 5 | OCMJEA in progress...
Denise Advincula
Ranch Hand

Joined: Jan 01, 2007
Posts: 163
Hello!

For some unknown reason, it has suddenly worked. I am not really sure if this solved the problem: I did a very simple java program in the same folder that just writes a file in that current folder.

Then when I tried my application again, it mysteriously logs to the file now.

Anyway, thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: File-logging program working in Windows, but not in Linux