0

With the help of the information on the link below, I was able to view the source code of my jar file. Eclipse java debugging: source not found

Now my problem is when I debug, F8 doesn't take me to those source files. If I use F5, it takes a lot of time but I can get to the java class of the jar file but not on the line I want to go to.

For example, if class ABC is one of the classes from jar file, during debugging if I want to go to Method1, the debugger will take me to some line in Method2.

Please advice, Thanks.

 public class ABC
{

    public void Method1()
    {

    }

    public void Method2()
   {

   }

}

sarah
  • 1
  • 1
  • If the line numbering doesn't match the source, it's likely because that's not what your compiled classes or jars were compiled from. That information is written into the class file by the compiler. Check the versions of the compiled classes and sources and make sure they match. – nitind Dec 12 '20 at 01:45
  • Not sure but this could be the reason - It's happening because your code is still refered from jar file(the binary - class file) not from the source. To resolve this, right click on project->build path->click on order tab->move up the source before the jar file. It's about the order in which the class file is refered. So I think in your case the binary jar still has still priority than the source code. – P.Sanjay Dec 12 '20 at 16:50
  • Thanks for the response. I guess it's the version than, The jar file version is javaSE-1.8 and I'm using latest version javaSE-15. Order seems to be ok. – sarah Dec 12 '20 at 20:24

0 Answers0