Meaningless Drivel is fun!*
The moose likes Beginning Java and the fly likes My app uses a .txt file to retreive a list of usernames and passwords, can I jar it? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "My app uses a .txt file to retreive a list of usernames and passwords, can I jar it?" Watch "My app uses a .txt file to retreive a list of usernames and passwords, can I jar it?" New topic
Author

My app uses a .txt file to retreive a list of usernames and passwords, can I jar it?

Eric Larsen
Ranch Hand

Joined: Mar 28, 2009
Posts: 35
I will post the code for the classes if anyone needs to see it. Thanks in advance for the help.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10172
    
    8

Yes you can.
However, when you open a stream to the file to read the contents, you should be doing it using the getClass().getResource() method.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2247
    
    7

But then new users can't be added and existing users can't be removed.


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38062
    
  22
And anybody who has a copy of the .jar can unzip it and read all the passwords.
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 917

an out of the topic answer:

1. Do not store username and passwords in text file.
2. Store them in database.
3. If possible, hash the passwords before storing in database.


My Website: [Salvin.in] Cool your mind:[Salvin.in/painting] My Sally:[Salvin.in/sally]
 
wood burning stoves
 
subject: My app uses a .txt file to retreive a list of usernames and passwords, can I jar it?
 
Similar Threads
Cant use object from another class
WA #1.....word association
Posting to bump up my count...
Text box value is not being completely filled with request attribute
The x900 effect ?