This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am developing an Application which is dependent on some PATHS which i am using as String variables.These PATHS are needed for file creation and other purposes. I need some ideas as to how can i change these PATHS without recompiling the code and use the same application on other system. One way I can do is have a text file in which I can set these PATHS and read from that file. But is this the feasible solution? All of your views are welcome. Thanks in advance, yogesh
"Thinking of doing something is also doing something ...so don't just stop thinking!"
or if not command line, simply use txt files to hold the paths.
B.C.S.T, SCJP, Hero
Joined: Oct 02, 2003
Thanks Kishore ,Jeroen and Antoine ofr spending ur valuable time. And command line idea is not at all feasible for me as I can have many such parameters. So now shall I consider that maintaining text file is the best option? If so, then in future if i need some info to be in these files which should be secure, eg.Database Username-Password,will it be feasible then... Taking your valuble time but my problem is genuine... Thanks again, Yogesh
Joined: Oct 02, 2003
any ideas........? suggesstions... how can I handle such a file in a secure way .... or any other way to handle the sensitive data...like passwords,usernames.. thanks in advance, yogesh
Joined: Jan 24, 2004
you could make a simple encryption/decryption algorithm in your program. its a more basic solution but as long as the userid etc were not legible to people who ahve access to the text file, i cannot see any issues. twans
If you want platform independence, then you should externalize platform dependent data into properties files or XML or something like that. Your application should not store sensitive data like usernames and passwords in these files. If you want a secure application, use authentication and authorization supported by Java. You'll have to have the user log in as their using your application--there's no other way. Think about it...what if linux or Windows didn't force you to log in to use the OS and just let you store your authentication parameters in a text file. What's to stop anyone else from walking up and using your login? Unfortunately, there's no shortcut to security. sev