Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to hide the password in .class file?

843854Oct 28 2002 — edited Oct 28 2002
Hi All,
I try to use a Connect.java file to connect to MySQL. The URL is similar to the following:

"jdbc:mysql://192.168.1.1/database?user=name&password=123456"

When I compile the .java file to a .class file, I can still see the full URL line in the machine codes of the Connect.class file.

How to avoid exposing the password in the line?

Thank you.
Anthony Pong
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 25 2002
Added on Oct 28 2002
4 comments
309 views