Those pervs are called "chikan" but some measures have been taken against them. There are special women-only parts of the train, especially during rush hour, there are special police men without uniform in the station and on the trains and there's a campaign telling 'chikan' they are wrong. Don't ask me what the purpose of such a campaign is (ちかんあかん!) but it's propably a way to make it more open and therefore easier for victims to resist, which indeed didn't always happen in the past.