It's a rule which is enforced to varying degrees by different teachers. Some teachers don't care whether or not you're wearing jeans, whereas others will cut your attendance or even fine you. Regardless of this though it's not uncommon to see guys wearing jeans at school. Although it would be best to avoid them all together I suggest that you avoid wearing jeans at least in the beginning, see what happens to the other guys a few times when they get caught and then decide for yourself if you think it's worth it.