I've written selenium java code in eclipse and clicked on 'Check In' button in the Team Explorer to save code in the TFS but instead of Changeset It's showing the local path of the project. This used to work earlier but suddenly it stopped working.

Based on my test, I couldn't reproduce this issue.
But you could try to create a new workspace in eclipse. Then you could check out the files ,make changes and check in the changes again.
Here are the steps:
Step1: Select options-> Manage workspace -> Add to add a new workspace.
Step2: Map the local path.
Step3: Select the Check Out for Edit option and add the changes to the files.
Step4: Please click the Check in Option and check if it could work.
Hope this helps.