Well it purely depends, yes it could die if you keep it in a glass jar unless you poke holes into the lid and give it some damp soil and possibly a stick to keep it occupied, but a glass jar isn't necessarily a good choice because the space is often small, but you should put the frog in a container that is perfect for its size. Yet don't take it from me, it would be best to consult perfessional websites.