Hello, I am making a little project, but when I publish or generate a jar file, it won't run, only in the greenfoot editor, this is my code
If anyone can see what I have made wring please help me
import greenfoot.*;
/**
* Write a description of class Goku here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Goku extends Actor
{
GreenfootImage getimage = getImage();
int idleCount=0;
int flyCount=0;
int kameCount=0;
int flySpeed=3;
boolean idle;
boolean flying=false;
boolean reverse=false;
boolean kamehameha=false;
public Goku()
{
// stuff for stuff
}
/**
* Act - do whatever the Goku wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
movement();
animation();
}
public void movement()
{
if(!kamehameha)
{
if(Greenfoot.isKeyDown("a") || Greenfoot.isKeyDown("d"))
{
idle=false;
flying=true;
}
else
{
idle=true;
flying=false;
}
}
if(!kamehameha && Greenfoot.isKeyDown("w") && getY()>30)
{
setLocation(getX(), getY()-flySpeed);
}
if(!kamehameha && Greenfoot.isKeyDown("a") && getX()>30)
{
setLocation(getX()-flySpeed, getY());
reverse=true;
}
if(!kamehameha && Greenfoot.isKeyDown("s") && getY()<385)
{
setLocation(getX(), getY()+flySpeed);
}
if(!kamehameha && Greenfoot.isKeyDown("d") && getX()<1025)
{
setLocation(getX()+flySpeed, getY());
reverse=false;
}
if(Greenfoot.isKeyDown("space") && !kamehameha)
{
kamehameha=true;
kameCount=0;
}
else if(kameCount>=-8 && kameCount<=-4)
{
kamehameha=false;
}
}
public void animation()
{
if(idle)
{
if(kamehameha)
{
if(kameCount>=0 && kameCount<=6)
{
setImage("//GokuFly/FlyingKamehameha01.png");
}
else if(kameCount>=7 && kameCount<=13)
{
setImage("//GokuFly/FlyingKamehameha02.png");
}
else if(kameCount>=14 && kameCount<=20)
{
setImage("//GokuFly/FlyingKamehameha03.png");
}
else if(kameCount>=21 && kameCount<=27)
{
setImage("//GokuFly/FlyingKamehameha04.png");
}
else if(kameCount>=28 && kameCount<=27)
{
setImage("//GokuFly/FlyingKamehameha05.png");
}
else if(kameCount>=35 && kameCount<=41)
{
setImage("//GokuFly/FlyingKamehameha06.png");
}
else if(kameCount>=42 && kameCount<=48)
{
setImage("//GokuFly/FlyingKamehameha07.png");
}
else if(kameCount>=49 && kameCount<=55)
{
setImage("//GokuFly/FlyingKamehameha08.png");
}
else if(kameCount>=56 && kameCount<=62)
{
setImage("//GokuFly/FlyingKamehameha09.png");
}
else if(kameCount>=63)
{
setImage("//GokuFly/FlyingKamehameha10.png");
kameCount=-40;
}
kameCount++;
}
else if(idleCount>=0 && idleCount<=4)
{
setImage("//GokuFly/IdleFly01.png");
}
else if(idleCount>=8 && idleCount<=15)
{
setImage("//GokuFly/IdleFly02.png");
}
else if(idleCount>=16 && idleCount<=23)
{
setImage("//GokuFly/IdleFly03.png");
}
else if(idleCount>=24)
{
setImage("//GokuFly/IdleFly04.png");
idleCount=-8;
}
idleCount++;
}
else if(flying && reverse)
{
if(flyCount>=0 && flyCount<=6)
{
setImage("//GokuFly/GokuFly01Rev.png");
}
else if(flyCount>=7 && flyCount<=13)
{
setImage("//GokuFly/GokuFly02Rev.png");
}
else if(flyCount>=14 && flyCount<=20)
{
setImage("//GokuFly/GokuFly03Rev.png");
}
else if(flyCount>=21)
{
setImage("//GokuFly/GokuFly04Rev.png");
flyCount=0;
}
flyCount++;
}
else if(flying && !reverse)
{
if(flyCount>=0 && flyCount<=6)
{
setImage("//GokuFly/GokuFly01.png");
}
else if(flyCount>=7 && flyCount<=13)
{
setImage("//GokuFly/GokuFly02.png");
}
else if(flyCount>=14 && flyCount<=20)
{
setImage("//GokuFly/GokuFly03.png");
}
else if(flyCount>=21)
{
setImage("//GokuFly/GokuFly04.png");
flyCount=0;
}
flyCount++;
}
}
}



