aspose file tools
The moose likes JDBC and the fly likes how to protect password in java file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "how to protect password in java file" Watch "how to protect password in java file" New topic
Author

how to protect password in java file

hitesh parikh
Greenhorn

Joined: Jul 15, 2003
Posts: 3
Hi
In all jdbc programs we supply the username & password of the database user in the java program itself.
How can i avoid this. Say anybody can decompile the class file & obtain the username & password to the database
What are the other alternatives available
Rgrds
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Welcome to JavaRanch, hitesh parikh!
Obviously, the account information could reside in a properties file that is read in.
The class file would then not have explicitly knowledge of the account information and securing the properties file would be a separate issue.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: how to protect password in java file
 
Similar Threads
export database in mysql
Java Swing connection to Oracle database
Calling Html file from a servlet
How to read file as a different user from java application
How to get exact exception type