My program keeps saying that the method cannot be resolved

前端 未结 2 1064
一整个雨季
一整个雨季 2021-01-28 06:42

This program should tell me if it can find the file I am naming. Eclipse has no red lines but every time I run it I get this error message and I don\'t know why. Thank you in ad

2条回答
  •  暖寄归人
    2021-01-28 07:16

    A few things to try.

    It looks like your ReadFiles class is not being compiled.

    You might try adding an import statement for your ReadFiles class to your main.

    Do a clean build.

    Also be aware that occasionally Eclipse goes "weird" and you need to do some combination of close it reopen it and/or clean the workspace and/or reboot. I know you would think with modern software... but still it happens.

    Here are a couple of links that may help.

    Keeping Eclipse running clean

    Restarting Eclipse Clean If You Cannot Run Eclipse From A Command Line (Mac OSX)

    As an aside, on some prior projects and versions of eclipse I found myself having to do this so frequently that I ended up just setting up eclipse to always launch with the clean option.

提交回复
热议问题