This may seem a weird Q.
I had written a code in Java (in Eclipse). Then, I did some modifications to the code. Now, I am trying to run the new code (modified), but it is still giving me the output which it was giving for the previous code.
I have put few debug points in the code, but it is skipping some of the debug points (though it should stop at them) and stopping at some debug point, but even here it is calling the methods which were present in previous code at that location (though I have commented them now). It seems from somewhere it is still debugging the old code.
How to get rid of it?
Thanks!
Have you tried cleaning the project?
Project(menu) -> clean
Also make sure
Project(menu) -> Build Automatically
is selected so that all new code you write is compiled then and there
If the clean and build doesn't work, it's possible that there is a jar file contains the class you edited, so the eclipse will run the compiled class file in the jar instead of your current file.
There are two possibilities because of which the java code is not updating properly:
In .project
file of Project org.eclipse.jdt.core.javabuilder
build command is commented or missing. Here the below mentioned piece of code should not be commented:
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments></arguments>
</buildCommand>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With