This site requires JavaScript, please enable it in your browser!
Greenfoot back
ellen.spertus@gmail.com
ellen.spertus@gmail.com wrote ...

2015/7/25

Bug report: "Needs compile" not going away

I am working through the textbook on the first little-crab scenario. As instructed, I changed Crab's act() method to:
public class Crab extends Actor
{
    public void act()
    {
       move(5);
       if (isAtEdge())
       {
           turn(17);
        }
        move(5);
    }
}
No matter how many times I click on "Compile" in the editor window or the main window, the Crab class is slashed out. If I hover over it, I see the message "Needs compile". Clicking Reset does not help. My configuration is: Greenfoot version 2.4.2 (Java version 1.8.0_31) Virtual machine: Java HotSpot(TM) Client VM 25.31-b07 (Oracle Corporation) Running on Windows 7 6.1 (x86) Java Home: C:\Program Files (x86)\Greenfoot\jdk\jre
danpost danpost

2015/7/25

#
Clicking 'Compile' in the editor window only compiles the class the editor contains (links to other classes may also be compiled at that time). To compile the project as a whole, use the 'Compile' button on the main scenario frame (at the lower right -- underneath the class window).
danpost, thanks, but I did try the Compile button in the main scenario frame.
danpost danpost

2015/7/25

#
ellen.spertus@gmail.com wrote...
danpost, thanks, but I did try the Compile button in the main scenario frame.
Do the 'Run' and 'Act buttons become clickable or do they stay gray? I am guessing they become clickable as in the image above. NOTE: I see you DID say you tried the main window also (missed that before).
danpost danpost

2015/7/25

#
From what I can tell, since the class says it compiles okay, the slashes should not be there and the pop-up should show 'new Crab()' instead of 'Needs compile'. No one else has mentioned this issue as yet that I know of; however, it does sound like a bug -- possibly in BlueJ (guessing).
davmac davmac

2015/7/26

#
I have seen this before once or twice when the date on the source files (the .java files) is in the future. In that case I believe the problem goes away if you edit the file (just add a comment, or add and then remove a blank line) before compiling. Could you check the dates on the files? (using Windows Explorer).
Diamond_Lad Diamond_Lad

2016/7/3

#
i am also having this problem on one of my actor and it says there is nothing wrong with it in the editor window
danpost danpost

2016/7/3

#
Diamond_Lad wrote...
i am also having this problem on one of my actor and it says there is nothing wrong with it in the editor window
@Diamond_Lad, did you try closing out the greenfoot application and re-opening it to recompiling the project?
CE3A CE3A

2016/7/4

#
I have also encountered this a few times, and as danpost mentioned, it has always worked to save everything and restart greenfoot. also, as davmac suggested, making a small edit, then compiling will usually work. i don't think this edit can be just adding/removing blank lines because java ignores whitespace (and any decent IDE should know this), but editing comments may work.
loxtn10 loxtn10

2016/8/21

#
I also encounter this, this shouldn't happen the deadline of the project game is coming near, help me please
You need to login to post a reply.