Is this happening after you click on the Verify button or in the Upload button? If this is happening with the Verify button, if you select another board, does it work?
Did you have any issues while installing the boards with the Boards Manager?
Let's try the following:
1. Go to Control Panel > Programs > Uninstall a program
2. Select the Arduino and click on the Uninstall button.
3. When the Uninstall process finished, go to C://Users/You/AppData/Roaming and delete the folder named Arduino15
4. Install again the Arduino IDE and the boards with the Boards Manager.
Let us know if you get improvements with this.
I did try the steps suggested by you. After doing that when I try to upload the blinky program I get the error given below and it gets stuck on compiling sketch:
Please suggest me what can be done about this and to remind you I am using windows 10 and hope is this is not the compatibility issue.
I checked the Arduino - ReleaseNotes. The r5 from 2015.08.28 has an update with:
* Fixed a but preventing upload on boards that do not supply VID/PID. See #3738
I think it is related to the error you were getting the last time, could you do again all the process of uninstalling the program and deleting the files and install again this latest version?
Also, as the error is related to Java, which Java version do you have in your PC?