In the year 2020 the developers made an announcement about an important change to Minecraft: Java Edition, since players will soon be required to switch from a Mojang account to a Microsoft account in order to continue playing. Although Dhakacourier.net 's an incredibly long time to wait the developers have confirmed the date and made the final call for account migration.
As as of March 10, you'll not be able to play Minecraft: Java Edition with a Mojang account. To ensure "improved security, player safety and security" the developers would like everyone to switch to Microsoft accounts. They offer free Minecraft caps to encourage players to do so.
Here are all the information about how you can migrate your account. Java Edition will be supported as normal following the change and will remain a separate entity from Bedrock. This is a purely unification of the accounts systems. You'll be able keep your old username, too - you'll just need to have an Xbox gamertag to go with it.