about javac
来源:互联网 发布:信融财富网络借贷 编辑:程序博客网 时间:2024/04/30 22:07
/*
*-----------------------------------------------------------------------
*/
javac(compile.execute)]
javac <options> <source>
what i will say is the important options which a java programer should know.
-verbose :show the process of compiling which is a good thing for realizing the java's compiling.
an example of show:
[parsing started /home/zvin/desktop/Hello.java]
[parsing completed 18ms]
[search path for source files: /home/zvin/desktop]
[search path for class files: /usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/resources.jar,/usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/rt.jar,/usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/sunrsasign.jar,/usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/jsse.jar,/usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/jce.jar,/usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/charsets.jar,/usr/lib/jvm/java-6-sun-1.6.0.15/jre/classes,/usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/ext/sunjce_provider.jar,/usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/ext/localedata.jar,/usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/ext/dnsns.jar,/usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/ext/sunpkcs11.jar,/home/zvin/desktop]
[loading /home/zvin/desktop/test2/Test.class]
[loading java/lang/Object.class(java/lang:Object.class)]
[loading java/lang/String.class(java/lang:String.class)]
[checking test1.Hello]
[loading java/lang/System.class(java/lang:System.class)]
[loading java/io/PrintStream.class(java/io:PrintStream.class)]
[loading java/io/FilterOutputStream.class(java/io:FilterOutputStream.class)]
[loading java/io/OutputStream.class(java/io:OutputStream.class)]
[wrote /home/zvin/desktop/Hello.class]
[total 165ms]
-classpath||-cp <path> :specify the path where the *.class files or annotation that compiling source.java needs
note:the <path> don't include the package path(use /usr/home/zvin rather than /usr/home/zvin/java/lang/String.class).
an example:
javac -classpath /usr/home/zvin HelloWorld.java
-sourcepath <path> :specify the path of source java files which compiling needs.
note:the source java files found to help compile will also be compiling that you can understand if you known the principle of java's compile.
note:the <path> don't include the package path(use /usr/home/zvin rather than /usr/home/zvin/java/lang/String.java).
an example:javac -sourcepath /usr/home/zvin/desktop /home/zvin/HelloWorld.java
-d <directory> :specify the directory where you want your generated class files exit
note:if you don't use -d option,compiler will put generated class files defautly where your source java file is in without the package path.
so,use -d option is quite successary.
finally,a better simple javac command should like this:javac -classpath <path> -d <directory> <source>
- about javac
- javac
- javac
- javac
- javac
- javac
- javac
- about:
- about
- About
- About
- About
- 编译器-Javac
- javac 理解
- 编译 javac
- javac 使用
- javac usage
- javac使用
- 透明as3截获浏览器鼠标滚轮事件的解决
- 每天做个算法题
- Oracle Function
- 在ADF中为Table自动生成行号
- UML图包括:用例图、类图、序列图、状态图、活动图、组件图和部署图
- about javac
- XMLBean应用
- 使用af:table的detailStamp
- Redhat(Linux)上的JBoss管理配置
- 引用Microsoft.Office.Interop.Excel.dll操作Excel常用方法
- 做一棵永远成长的苹果树
- 微软.NET程序员系列
- 启动sendmail出错的解决办法
- struts2 common-fileupload上传文件大小限制 - hanxin830311 - JavaEye技术网站