Whenever I build my projects in netbeans to a .jar file they work fine on that machine. However, when I transfer them to another machine and execute them I get the following error:

The main class cannot be found.

I set the main class to the right one in netbeans before building it and like I said it works fine on the machine I built it on but not on others... what could be the problem?