set JPDA_TRANSPORT=dt_socket
set JPDA_ADDRESS=8000
set JPDA_SUSPEND=y
call "%EXECUTABLE%" jpda start %CMD_LINE_ARGS%
以上设置的这些参数最终在catalina.bat中被调用!
2、参考【java程序】的[步骤3]的操作。 在eclipse里面的设置和上面的java相同。
调试的时刻源码行号对不上
Eclipse下Debug时弹出错误“Unable to install breakpoint due to missing line number attributes,Modify compiler options togenerate line number attributes”
遇到这个错误时找到的解答方案汇总:
使用Ant编译时,未打开debug开关,在写javac 任务时确认debug=true,否则不能调试。THe settings for the eclipse compiler don’t affect the ant build and even if you launch the ant build from within eclipse. ant controls it’s own compiler settings.you can tell ant to generate debugging info like this ‘javac … debug=“true”…/>(我的问题是因为这个原因);
编译器的设置问题,window->preferences->java->Compiler在compiler起始页,classfile Generation区域中确认已经勾选了All line number attributes to generated class files。如果已经勾选,从新来一下再Apply一下。或者从项目层次进行设定,项目属性->java compiler同样在起始页,确定已经勾选
// move the files created in the temp dir into the perm dir
// and then delete the temp dir from the local FS
private void moveFromTempToPerm() throws IOException {
try {
FileStatus[] fileStatus =
localFs.listStatus(temp, LuceneIndexFileNameFilter.getFilter());
Path segmentsPath = null;
Path segmentsGenPath = null;
// move the files created in temp dir except segments_N and segments.gen
for (int i = 0; i < fileStatus.length; i++) {
Path path = fileStatus[i].getPath();
String name = path.getName();
if (LuceneUtil.isSegmentsGenFile(name)) {
assert (segmentsGenPath == null);
segmentsGenPath = path;
} else if (LuceneUtil.isSegmentsFile(name)) {
assert (segmentsPath == null);
segmentsPath = path;
} else {
fs.completeLocalOutput(new Path(perm, name), path);
}
}
// move the segments_N file
if (segmentsPath != null) {
fs.completeLocalOutput(new Path(perm, segmentsPath.getName()),
segmentsPath);
}
// move the segments.gen file
if (segmentsGenPath != null) {
fs.completeLocalOutput(new Path(perm, segmentsGenPath.getName()),
segmentsGenPath);
}
} finally {
// finally delete the temp dir (files should have been deleted)
localFs.delete(temp);
}
}
// First cast ServletRequest to HttpServletRequest.
HttpServletRequest hsr = (HttpServletRequest) request;
// Check if requested resource is not in /test folder.
if (!hsr.getServletPath().startsWith("/test/")) {
// Not in /test folder. Do your thing here.
}
① 在“Install boot loader on /dev/sda”选项的时刻,选择“Change device”。
② 在弹出的“Boot loader device”对话框中选择“First sector of boot partition - /dev/sda4”(/dev/sda4为我安装Fedora的主分区)