• Post Reply Bookmark Topic Watch Topic
  • New Topic

Createing platform independent resource files  RSS feed

 
sachin pathak
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am working on a application which uses log4j for logging. log4j uses a properties file from which it reads file path to which it will create a log file.


If I am running applicaiton on Linux then the path needs to be given as for eg. /export/sites/finselect/webapps/finselect/logs/log and if I am working
on Windows it needs to be specified for eg. C:\\webapps\\finselect\\logs\\log.

Is there any way I can use equivalent of File.separator constant in properties files so that I will be saved to maintain two diffrent versions of file for 2 operating systems.

Sachin
 
C. Nimo
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just use '/'.
It works on windows as well.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!