java – Legality of the musical application

I am looking for how to do my project legally. This is a java application similar to spotify, but I wonder where I can get all the music with and without copyright to use it in my application and be able to reproduce it without any legal consequences. It would be public and not-for-profit.