I am new to Greenfoot, so don't know much about it. If you could make your answers as simple as possible I will appreciate it.
if (<< on ground >> && << space key down >>) << set field for vertical speed to some negative value >>;
setLocation(getX(), getY()+<< vertical speed >>);