4

I have found a few question about the issue here on StackOverlow, but all were about own written code. My problem is a bit different, because I want to debug a Java API class, named javax.swing.JComponent.

My first problem was, that I couldn't see any sources. I fixed it described like here Attach the Java Source Code by attaching the source to rt.jar.

Now I see the source and I want to set a breakpoint in the JComponent class. If I try so, I get the error message:

error message

"Modify compiler options to generate line number attributes". That is a nice proposal. But my JDK version was already compiled when I downloaded it..

So, do I have it to compile on my own? Or do you have other advices?

Thanks for your help!

P.S.: I have installed - Eclipse Neon - jdk1.8.0_91 - Windows 10 (64 Bit)

Community
  • 1
  • 1
mrbela
  • 4,477
  • 9
  • 44
  • 79

2 Answers2

1

One probable issue could come from your application server in IDE pointing to JRE instead of JDK.

Try verifying:

Window -> Preferences --> Server --> runtime environments

<Your-Application-Server> --> edit

Select a JDK instead of JRE

Not sure if you have gone through this link.... has few solutions which worked for some.

Eclipse - Unable to install breakpoint due to missing line number attributes

Community
  • 1
  • 1
mhasan
  • 3,703
  • 1
  • 18
  • 37
  • 1
    I don't use an application server.. So that couldn't be the solution, or am I wrong? Thanks for help! – mrbela Dec 06 '16 at 14:31
1

this happens when you use JRE on your build path in this case. Try do this: Window -> Preferences --> Java --> Installed JRES-->then use jdk as default JRE

problem fixed!

Aruforce
  • 11
  • 2