con=DriverManager.getConnection("jdbc:oracle:thin:@172.16.37.1:1520:A","it","it") In the above text ,we can see the password can i not hide this password. Any help is appreceated . Thanks in advanc Urgent [ Edited by Dave to fix the ] [ February 01, 2002: Message edited by: David O'Meara ]
Are you worried about the password being read from your source code, as it flies across the network, or what? I read my password out of an INI file, where it is encrypted (weakly, but keeps people from reading it easily). It could still be read off the wire, but no simple way to solve that. Keeps it out of the source code, too.
If you want to avoid hardcoding the url in your class then it is better to read the password etc from a property file. This way you only need to change the property file if the password changes. However the property file itself is a plain text file, so you should make sure that the server itself is not accessible everyone!!
"Les D", The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please re-register and select a new name which meets the requirements. Thanks. Dave
subject: (urgent) Any alternative of hardcoded password in JDBC URL