File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Absent Line Number Information - I'm NOT using Ant Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Absent Line Number Information - I Watch "Absent Line Number Information - I New topic
Author

Absent Line Number Information - I'm NOT using Ant

G Lambert
Greenhorn

Joined: May 14, 2009
Posts: 11
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? =)


Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30908
    
158

Have you check the compiler settings in Eclipse (workspace preferences) ? Maybe it's set to not include debug info?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30908
    
158

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

Joined: May 14, 2009
Posts: 11
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.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5842
    
    7

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.


JBoss In Action
G Lambert
Greenhorn

Joined: May 14, 2009
Posts: 11
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
Bartender

Joined: May 14, 2008
Posts: 5842
    
    7

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Absent Line Number Information - I'm NOT using Ant