在ant编译java文件时产生debug信息
使用ant编译java文件时,如果没有设置debug属性,则不会产生编译信息,ant的默认设置是不打印编译信息。
如果想在编译过程中显示编译信息,需设置debug属性为true,并且设置debugLevel,如下代码所示:
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或其组合才会打印出信息。
在ant编译java文件时产生debug信息的更多相关文章
- jdk编译java文件时出现:编码GBK的不可映射字符
出现此问题的几种解决办法: 1.cmd下使用javac编译java文件 如: javac test.java 解决办法:编译时加上encoding选项 javac -encoding UTF-8 te ...
- 在用mvn编译java文件时遇到问题
问题一:找不到加载主类 为什么会出现这类加载失败的问题那??? 一看这个问题就是环境变量配置有问题,找到问题解决就ok了!!! 问题二:无法用mvn编译java文件 这个问题是由于pom.xml文件出 ...
- 用Javac编译Java文件时出现“编码 GBK 的不可映射字符“的error
前提:JDK版本 >= 1.6会出现编译报错, 1.6前只会是警告 以下是javac的document: 遇到这种情况的原因是: 文件编码格式与编译器编译所选的encoding不同,有非英文字符 ...
- Intellij Idea编译项目下的.java文件时的编码问题
Intellij Idea编译项目下的.java文件时的编码问题 原创 2015年07月22日 21:45:14 10510 由<编译.java文件时的编码问题>可知,在编译.java文件 ...
- ant编译java的例子
ant hello world 建一上文件夹HelloWorld.里面的内容如下所示: 第一个例子不讨论build1.xml和HelloWorld1.java.运行出helloworld程序要如下步骤 ...
- Intellij Idea调试java文件时 怎么跳过class文件?
Intellij Idea调试时 java文件时,遇到class文件时它也会反编译该文件,并跳入该class文件内一条条语句执行.这让我烦透了,怎么跳过class文件,继续调试啊? SETTINGS- ...
- 用cmd命令行编译JAVA程序时出现“找不到或无法加载主类”
今天复习Java基础知识时,使用cmd命令窗口进行编译Java文件发现了如下问题: 网上有很多的解决方法,和问题出现的讨论,以下方法是解决我出现这个问题方式. 解决方式: 重点是圈住的部分. 下面是我 ...
- Maven 手动添加第三方依赖包及编译打包和java命令行编译JAVA文件并使用jar命令打包
一,实例:新建了一个Maven项目,在eclipse中通过 build path –> configure path-.将依赖包添加到工程中后,eclipse不报错了.但是用Maven命令 mv ...
- java_基础——用代码编译.java文件+加载class文件
[本文介绍] 本文不是深入理解和使用java编译器,只是在代码里编译.java文件的helloWorld.这种技术还是蛮有意思的,说不定在将来的某些只能化项目会运用到!^_^ [简单编译的流程] [j ...
随机推荐
- printf("%f\n",5);
http://zhidao.baidu.com/link?url=87OGcxtDa6fQoeKmk1KylLu4eIBLJSh7CA3n5NWY-Ipm9TxZViFnIui307duCXWhaM0 ...
- Stream API
引例: 1 List<String> strList = Arrays.asList("zhaojigang","nana","tiany ...
- java 监控工具 jconsole
如图
- CSU 1808 地铁(最短路变形)
http://acm.csu.edu.cn/csuoj/problemset/problem?pid=1808 题意: Bobo 居住在大城市 ICPCCamp. ICPCCamp 有 n 个地铁站, ...
- python 函数赋值
⾸先我们来理解下Python中的函数 def hi(name="yasoob"): return "hi " + name print(hi()) # outp ...
- 01_DllZZ.cpp
1. // DllZZ.cpp : Defines the entry point for the DLL application. // #include "stdafx.h" ...
- Codeforces 454D - Little Pony and Harmony Chest
454D - Little Pony and Harmony Chest 思路: 状压dp,由于1的时候肯定满足题意,而ai最大是30,所以只要大于等于59都可以用1替换,所以答案在1到59之间 然后 ...
- 个人学期总结及Python+Flask+MysqL的web建设技术过程
一个学期即将过去,我们也迎来了2018年.这个学期,首次接触了web网站开发建设,不仅是这门课程,还有另外一门用idea的gradle框架来制作网页. 很显然,用python语言的flask框架更加简 ...
- TP5框架whereor
whereOr方法 Db::table('think_user') ->where('name','like','%thinkphp') ->whereOr('title','like', ...
- 动态规划3--Help Jimmy
动态规划3--Help Jimmy 一.心得 二.题目 三.分析 Jimmy跳到一块板上后,可以有两种选择,向左走,或向右走.走到左端和走到右端所需的时间,是很容易算的.如果我们能知道,以左端为起点到 ...