OO purists tend to do the Class diagram first. People with a database background do the ER diagram first and "derive" the class diagram from this (this approach is frowned upon by OO purists)
I prefer an hybrid approach.
Identify the entities first. This should be same from both the database and application (classes) point of view.
Once you have agreed on the entities at a high level, proceed with class diagram and ER diagram in parallel directions - because the "relationships" are different in each. (If you are the only person working on them, then start with the class diagram first and then the ERD. But identify the entitied first).
In my opinion the high level entities should be same, both on the database and the application (Java/C#...). And it is very easy to proceed with the common base - especially if there are different people working on different parts (classes, database).