Were you expecting the .class files to be encrypted? The situation would be the same in any other language, not just
Java. If you compile sensitive data into an executable form, that data will be trivially easy to extract. Instead, either encrypt the stored data, in which case the user would have to enter a key to allow the data to be decrypted, or simply require the user to supply the password itself at runtime.