博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
在ant编译java文件时产生debug信息
阅读量:4599 次
发布时间:2019-06-09

本文共 1054 字,大约阅读时间需要 3 分钟。

使用ant编译java文件时,如果没有设置debug属性,则不会产生编译信息,ant的默认设置是不打印编译信息。

如果想在编译过程中显示编译信息,需设置debug属性为true,并且设置debugLevel,如下代码所示:

ant file - build.xml
1

ant的官方文档:

debug Indicates whether source should be compiled with debug information; defaults to off. If set to off, -g:none will be passed on the command line for compilers that support it (for other compilers, no command line argument will be used). If set to true, the value of the debuglevel attribute determines the command line argument. No
debuglevel Keyword list to be appended to the -g command-line switch. This will be ignored by all implementations except modern, classic(ver >= 1.2) and jikes. Legal values are none or a comma-separated list of the following keywords: lines, vars, and source. If debuglevel is not specified, by default, nothing will be appended to -g. If debug is not turned on, this attribute will be ignored.

这里要注意的是如果设置debug属性为true,但是没有设置debuglevel属性,编译时还是不会打印信息,因为debuglevel的默认值是none,只有单独设置为lines, vars, source或其组合才会打印出信息。

转载于:https://www.cnblogs.com/kingzzm/p/3325383.html

你可能感兴趣的文章
java----Java的栈,堆,代码,静态存储区的存储顺序和位置
查看>>
UITableView, 表视图
查看>>
教训 Mac下装windows系统 失败后 磁盘空间丢失
查看>>
poj2376 Cleaning Shifts 区间贪心
查看>>
下面介绍一下 Yii2.0 对数据库 查询的一些简单的操作
查看>>
oracle异常排查及思路
查看>>
undefined reference to `omp_get_max_threads'
查看>>
JS 对兼容性方法的效率考虑和选择
查看>>
深入进货单-记录进货过程--宇然电脑公司管理软件
查看>>
SpringMVC配置
查看>>
java与.net比较学习系列(4) 运算符和表达式
查看>>
深入探究jvm之GC的算法及种类
查看>>
ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务解决
查看>>
揭秘变量提升
查看>>
Python 变量引用
查看>>
webpack优化 -- happypack
查看>>
webpack优化 -- compression-webpack-plugin 开启gzip
查看>>
无限调用函数add(1)(2)(3)......
查看>>
Centos系统Python环境搭建和项目部署
查看>>
跨区导入
查看>>