Bug 25868 - JAVAC debug=off attribute is inconsistent among jikes and javac compiler
Summary: JAVAC debug=off attribute is inconsistent among jikes and javac compiler
Status: RESOLVED FIXED
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.6.0
Hardware: All All
: P3 minor (vote)
Target Milestone: 1.6.3
Assignee: Ant Notifications List
URL:
Keywords:
Depends on: 26404
Blocks:
  Show dependency tree
 
Reported: 2004-01-02 19:29 UTC by jslopez
Modified: 2005-03-17 02:00 UTC (History)
1 user (show)



Attachments
Contains a build file and a java file to display the problem (652 bytes, application/octet-stream)
2004-01-02 19:31 UTC, jslopez
Details
Show the modification to Jikes.java (365 bytes, patch)
2004-01-02 19:37 UTC, jslopez
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jslopez 2004-01-02 19:29:32 UTC
In order to see the problem you are probably going to need a decompiler I was 
using jad. The command I was running is jad -p -lnc Test.class
So this is the behavior am seeing:
ant compile -> jad shows no line numbers.
ant jikes compile -> jad shows line numbers

javac Test.class -> jad shows line numbers
jikes -classpath $JAVA_HOME/jre/lib/rt.jar Test.class -> jad shows line numbers

So the problem is as follows by default javac and jikes add the debugging
information to the class files. In order to disable the functionality the
-g:none flags needs to be passed. Ant does this automatically for javac but not
for jikes. Attached is a patch to Jikes.java that will
make the behavior consistent.

jdk 1.4.1_02
ant 1.6.0
jad 1.5.8e
Comment 1 jslopez 2004-01-02 19:31:42 UTC
Created attachment 9774 [details]
Contains a build file and a java file to display the problem
Comment 2 jslopez 2004-01-02 19:37:34 UTC
Created attachment 9775 [details]
Show the modification to Jikes.java
Comment 3 Stefan Bodewig 2005-03-14 13:49:43 UTC
The reason is that jikes didn't support -g:none when we wrote the code.

Any idea which version of Jikes added support for it?  If we change it now, we run
the risk of breaking support for older versions of Jikes that may still be in use.
Comment 4 Stefan Bodewig 2005-03-17 11:00:50 UTC
Jikes CVS hints it has been supported since 1.15, long enough to support it by
default IMHO.