I'm using Eclipse IDE (4.2). When I make a change in Eclipse and try to debug it, the previous version is compiled, but not the new one. To get around this, I do maven clean/build and then refresh the project. But this is very tedious and I need to do it every time I make any changes. Is there another way around this or a plugin that I can use to pick up these changes automatically?
Click Project > Build Automatically
once and make sure that tick mark is appeared in front of Build Automatically
option.
Also you have to enable hot code replace options. Click Windows > Preferences
. Go to Java > Debug
select all options in Hot Code Replace group
I had the same problem and these steps fixed it:
I had the same problem, the reason was a wrong configuration of the javabuilder in the .project managed by eclipse. I opened it and rewrited the buildspec section so that either maven or jdt.core can compile. Once done, relaunch eclipse and if the Project > Build Automatically option is enabled, any change should now be reflected :
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ProjectName</name>
<comment>My beautiful project</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.