-
-bootclasspath <路径> 覆盖引导类文件的位置
-
-extdirs <目录> 覆盖安装的扩展目录的位置
-
-endorseddirs <目录> 覆盖签名的标准路径的位置
-
-proc:{none,only} 控制是否执行注释处理和/或编译。
-
-processor [,,…]要运行的注释处理程序的名称;绕过默认的搜索进程
-
-processorpath <路径> 指定查找注释处理程序的位置
-
-d <目录> 指定存放生成的类文件的位置
-
-s <目录> 指定存放生成的源文件的位置
-
-implicit:{none,class} 指定是否为隐式引用文件生成类文件
-
-encoding <编码> 指定源文件使用的字符编码
-
-source <版本> 提供与指定版本的源兼容性
-
-target <版本> 生成特定 VM 版本的类文件
-
-version 版本信息
-
-help 输出标准选项的提要
-
-Akey[=value] 传递给注释处理程序的选项
-
-X 输出非标准选项的提要
-
-J<标志> 直接将 <标志> 传递给运行时系统
例子:
javac -encoding utf-8 -target 1.5 -bootclasspath E:\Androiddev\android-sdk-windows2.2\platforms\android-3\android.jar -d bin src\com\byread\reader\*.java gen\com\byread\reader\R.java
第四步:把.class文件转化成Davik VM支持的.dex文件
将工程bin目录下的class文件编译成classes.dex,Android虚拟机只能执行dex文件!
例子:
第五步:打包生成未签名的.apk文件
【输入】打包后的资源文件、打包后类文件(.dex文件)、libs文件(包括.so文件,当然很多工程都没有这样的文件,如果你不使用C/C++开发的话)
【输出】未签名的.apk文件
【工具】apkbuilder工具
apkbuilder工具用法如下:
-
-v Verbose.
-
-d Debug Mode: Includes debug files in the APK file.
-
-u Creates an unsigned package.
-
-storetype Forces the KeyStore type. If ommited the default is used.
-
-z Followed by the path to a zip archive.
-
Adds the content of the application package.
-
-f Followed by the path to a file.
-
Adds the file to the application package.
-
-rf Followed by the path to a source folder.
-
Adds the java resources found in that folder to the application
-
package, while keeping their path relative to the source folder.
-
-rj Followed by the path to a jar file or a folder containing
-
j