Window --> Preferences --> Java --> Compiler --> Classfile Generation: "add line number attributes to generated class file" was checked. I did a clean, recompile. I did uncheck it, recompile, check it, recompile. I made sure the project did use the global settings. Still the same message.
I switched to ant build, using
<javac srcdir="./src/java" destdir="./bin" debug="true">
清理了所有的breakpoint,Ant设置好了也能编过,还是不行。
Ant build.xml文件如下:
<?xml version="1.0" encoding="utf-8"?> <project default="main" basedir="."> <target name="main" depends="compile, compress" description="Main target"> <echo>Building the .jar file.</echo> </target> <target name="compile" description="Compilation target"> <javac srcdir="${basedir}/src/ATest" includeantruntime="true" debug="on"/> </target> <target name="compress" description="Compression target"> <jar jarfile="ATest.jar" basedir="${basedir}/src/ATest" includes="*.class" /> </target> </project>
Run as Ant:
Buildfile: E:workspaceAThinkingTestuild.xml
compile:
compress:
main:
[echo] Building the .jar file.
BUILD SUCCESSFUL
Total time: 468 milliseconds