• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Absent Line Number Information - I'm NOT using Ant

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello again,
My environment is JDK 1.4.1_02 with JRE 6 on Eclipse 3.4.

I receive the popup error window in eclipse telling me to modify my compiler settings. "Unable to install breakpoint in [projectname] due to missing line number attributes. Modify compiler options to generate line number attributes. Reason: Absent Line Number Information."

PLEASE NOTE: I have already checked the box "Add line number attributes to generated class files" in Java Compiler settings and I'm NOT using ant to build.

The interesting part: it WAS working fine. Then I had to delete the old associated EAR project. I created a new one with a stripped-down application.xml file (it doesn't describe any ejb's now) and NOW I get this error. Any ideas? =)


 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you check the compiler settings in Eclipse (workspace preferences) ? Maybe it's set to not include debug info?
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And while you aren't using Ant, you are using an IDE. I'll move this to our IDE forum for you.
 
G Lambert
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, if you mean Windows-->Preferences and then the Java-->Compiler section, I have the compliance level also set to 1.4 there. And the box is checked next to "Add line numbers to generated class files (used by the debugger)" as well.

I think it has something to do with the JRE being 1.6 and the compliance set to 1.4, but like I said, it used to work with no problems on that setting.

I really don't want to rebuild the workspace because of this glitch, but it's starting to look that way.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try this. Just build the app and then from a command line run "javap -verbose" against one of your class files. Does the output contain a "LineNumber Table": for each method? And what is the "major version" number reported? This will at least confirm whether Eclipse is building your app with 1.4 compliance and adding the line numbers.

Have you tried installing a 1.4.2 JDK, registering it with Eclipse, and setting your project to use that JDK? (Having multiple JDKs installed is not a problem, I have 1.3.1, 1.4.1, 1.4.2, 1.5, 6 and 7 on my PC.) If it is an issue with JDK 6, then doing this should solve the problem.
 
G Lambert
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Peter Johnson wrote:Try this. Just build the app and then from a command line run "javap -verbose" against one of your class files...



I just tried the javap -verbose and it returned this:

"Error: bad class format.\KISSettings.classThe major.minor version '49.0' is too recent for this tool to understand."

I see a similar result when I run the ant script inside eclipse that used to be used to build the ear. It states:



But please note, if I run the ant script from a cmd prompt, it builds the ear just fine...I can't even hazard a guess at this point. Is it CVS related? Is it still a compiler problem?


Have you tried installing a 1.4.2 JDK, registering it with Eclipse, and setting your project to use that JDK? (Having multiple JDKs installed is not a problem, I have 1.3.1, 1.4.1, 1.4.2, 1.5, 6 and 7 on my PC.) If it is an issue with JDK 6, then doing this should solve the problem.



All I have done is place the JDK in C:\j2sdk1.4.1_02\ and that is set to JAVA_HOME. In eclipse's Project Properties -->Java Compiler I have 'Compiler compliance level' set to 1.4...however the JRE is jre6...

 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks like you tried to run a JDK 1.4.2 version of javap to examine a class file that was compiled with JDK 5. That won't work. Try using the JDK 5 or 6 version of javap.

All I have done is place the JDK in C:\j2sdk1.4.1_02\ and that is set to JAVA_HOME. In eclipse's Project Properties -->Java Compiler I have 'Compiler compliance level' set to 1.4...however the JRE is jre6...



What I meant was to change the JRE used for the project, not the compliance level. Those are two different things. To change the JRE, in the project properties, on the Libraries tab of the Java Build path setting, select the JRE entry (mine says JRE System Library [jdk1.6.0_13]), ckicl the edit button, and select Alternate JRE and then choose the 1.4.2 JDK from the drop-down list box. If the 1.4.2 JDK is not in that list box, click on the Installed JREs button and add it.
reply
    Bookmark Topic Watch Topic
  • New Topic