No, there is no easy way: you can obfuscate things as much as you want, but if the plaintext password is available to the application at any point, without requiring access to any resources other than its own source code, it can be extracted by any human with access to that same source code as well.
When using a protocol like FTP, the whole exercise is a bit pointless anyway: anyone capable of downloading Wireshark can sniff the credentials off the network wire in seconds, if not less.
Steps towards properly solving your issue:
- Switch to a secure protocol, such as SFTP or FTP+SSL
- Use public-key authentication instead of a password (both SFTP and FTP+SSL support this, albeit in slightly different ways)
- Provide each deployment of the software with a (preferably unique, so you can detect credential sharing and disable the compromised accounts) copy of the private key/certificate required to log in
- Store the private key/certificate in the most secure way possible on the platform you're running on. On Windows, this means using the Certificate Store -- see this MSDN Magazine article for a nice introduction
EDIT (after modification of original question): the first paragraph of my reply applies equally to things like database passwords, etc. The solution for those situations gets even more platform-specific. If your particular database/whatever/OS combination does not support secure logons, there's not all that much you can do.
For example: on Windows, SQL Server supports NTLM authentication, allowing you to set database access rights based on existing Windows accounts, giving you automatic secure storage and transmission of passwords which is relatively hard to bypass. If NTLM authentication can't be used, the best you can do (as is the recommended practice on the .NET Framework) is to store the password, encrypted with a machine-specific key, in a configuration file. However, that 'protection' is trivially bypassed using a debugger, since the plaintext password is required at some point.