Hide string in open-source code?

java, obfuscation

Solution

Store the database connection settings separate from your code.

Problem

I've been working on a Java project for a while now, and before I make it available for public download, I'd like to add in a feature which requires me to connect to a MySQL database. My question is simple: How would I go about hiding the password to the database if the code is open-source?

Original source

Related problems