Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have a project in Java which get a file using smb client. When I edit this code and run it again in Eclipse, it is not running my modified code but running the same old one.

Checklist:

  1. I saved the file and made sure there are no write errors.
  2. Build Automatically is enabled.
  3. Run configuration is configured properly.
  4. There are no unresolved errors.

what am i doing wrong?

share|improve this question
    
What is the error message? –  Adam Arold Jun 25 at 8:50
    
There is no error message. It running perfectly fine, but it is running the old code, not my new modified code. –  RK Poddar Jun 25 at 8:52
    
Do you edit the files in a local folder or on a network share? –  Aaron Digulla Jun 25 at 8:55
    
I edited the .java files in a local folder using Eclipse. –  RK Poddar Jun 25 at 8:57
add comment

2 Answers

Delete bin folder data and clean project. To clean project: Go on Project-->Clean-->select your project-->clean-->build project This will solve your problem, if this does not work, please write a Hello world program and check this works or not. If this is also not working, check your Eclipse

share|improve this answer
    
I cleaned the project. It didnt solve the problem. Hello world didnt work either. –  RK Poddar Jun 25 at 9:02
    
Reinstall your eclipse with latest SDK, make your work space in other drive than the drive contains your operating system files and folders. refer developer.android.com/sdk/index.html#download –  Puneet Jun 27 at 7:34
add comment

To find out whether Eclipse has really compiled your code, have a look into the bin/ folder of the project and check the date of the .class files in there. You will have to do this outside of Eclipse since it hides the content of this folder by default.

Use "Clean Project" to force a rebuild.

If that looks correct, the next step is to go to the Debug Perspective. Open the Properties Dialog for the process. Eclipse will then show you the classpath that it used to start the process. Make sure the paths are correct.

share|improve this answer
    
Thanks. Turns out, Eclipse has not really compiled my code. What should i do now? –  RK Poddar Jun 25 at 8:56
    
Use Project Menu -> Clean -> select your project -> OK. That should force a rebuild. Also make sure that the time stamps of your source files aren't in the future. –  Aaron Digulla Jun 25 at 8:59
    
I cleaned the project but looks like Eclipse is not able to rebuild it (There are no files in the bin folder, even after Ctrl+B). I am getting the main class not found error. –  RK Poddar Jun 25 at 9:06
    
Okay. Open the "Error Log View". Do you see anything which might be related? –  Aaron Digulla Jun 25 at 9:17
    
Yes, it could not delete a few folders and a file when cleaning the project. Does that help in identifying the problem? –  RK Poddar Jun 25 at 9:21
show 4 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.