This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 160
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: 160
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
 
Similar Threads
Createing platform independent resource files
Logging inside the jar file !
Using Simple Logging
NX: concerning logging
Jar file accessing folder