First don't eat the Jellybeans you will need them for the project. The amount of Jellybeans you will needs depends on how big you jar lid is and how many you eat.
What you need
Craft Glue or Hot Melt Glue
Glass Jar with lid
Start by cleaning your jar lid surface of any dirt. You may want to paint this lid if the color in undesirable.
Start by gluing one jelly bean in the middle and work your way to the outsides of the jar. Make sure they are stuck firmly. You should now have one full layer of Jellybeans flat on your jar lid.
Once the glue has dried give this section a light coat of the varnish. This will prevent anything getting in later and eating the sugar off the beans. (we have to make it bug proof).
Before the varnish dries completely start sticking the next layers of Jellybeans on. The wet varnish will help to adhere the beans. You want to lay them out so that every layer will be slightly in from the last to give a overall peak effect. The Jellybeans should look like they are mounded up upon the jar lid.
Once you have completed each layer to your desired height allow it to dry. Begin coating all the Jellybeans with the varnish to seal it all up.
A couple of coats of varnish should be plenty. Just make sure all the Jellybeans are coated.
Once it is all dry, screw the lid back onto the jar. You may want to place some ribbons around the rim of the lid to finish it off.
Now you can look at Jellybeans all day and not be tempted to eat them.