When debugging in eclipse, an error message is displayed: "unable to install breakpoint due to missing line number attributes. Modify compiler options to generate line number attributes", which cannot be debugged.
Summary of solutions found when this error occurs:
1. ModifyEclipseJava compiler uses JDK instead of JRE;
2. When ant is used for compiling, the debug switch is not enabled. When writing a javac task, set DEBUG = "true". Otherwise, debugging cannot be performed. The settings forEclipseCompiler don't affect the ant build and even if you launch the ant build fromEclipse. Ant controls it's own compiler settings. you can tell ant to generate debugging info like this 'javac... DEBUG = "true "... />; (the problem I encountered is solved using this method)
3. For compiler settings, window-> preferences-> JAVA-> compiler checks all line number attributes to generated class files in the classfile generation area on the compiler start page. If this option is already selected, apply it again. You can also set it at the project level. Select Project Properties> Java compiler on the start page.
The outof memory problem occurs during eclipse compilation. The solution is as follows:
Window-> preferences-> JAVA-> installed jres, select the installed JRE (such as jdk1.5.0), and click "edit" on the right to bring up the "Edit JRE" dialog box, enter-xmx512m in the input box of the default VM argument, and then press OK. (-XMS indicates the Minimum Memory and-xmx indicates the maximum memory)