首页 > 代码库 > Scalac 命令
Scalac 命令
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Users\Bo>scalac
Usage: scalac <options> <source files>
用法: scalac <选项> <源文件们>
where possible standard options include:
可能的标准选项包括
-Dproperty=value Pass -Dproperty=value directly to the runtime syste
m.
Dproperty这个选项的值将直接传递给运行时环境
-J<flag> Pass <flag> directly to the runtime system.
-J后面紧跟的内容会直接传递给运行时环境
-P:<plugin>:<opt> Pass an option to a plugin
传递参数给插件
-X Print a synopsis of advanced options.
打印高级选项的摘要
-bootclasspath <path> Override location of bootstrap class files.
覆盖默认的类加载器路径
-classpath <path> Specify where to find user class files.
声明用户定义的类路径
-d <directory|jar> destination for generated classfiles.
目标路径
-dependencyfile <file> Set dependency tracking file.
设置依赖追踪文件
-deprecation Emit warning and location for usages of deprecated
APIs.
对使用过时的API发出警告
-encoding <encoding> Specify character encoding used by source files.
声明源文件使用的编码方式
-explaintypes Explain type errors in more detail.
打印更详细的类型错误信息
-extdirs <path> Override location of installed extensions.
覆盖安装的扩展的路径
-feature Emit warning and location for usages of features th
at should be imported explicitly.
对使用需要显示导入的特性发出警告,并打印使用的位置
-g:<level> Set level of generated debugging info. (none,source
,line,vars,notailcalls) default:vars
设置调试信息的等级
-help Print a synopsis of standard options
-javabootclasspath <path> Override java boot classpath.
-javaextdirs <path> Override java extdirs classpath.
-language:<feature> Enable one or more language features.
-no-specialization Ignore @specialize annotations.
-nobootcp Do not use the boot classpath for the scala jars.
-nowarn Generate no warnings.
不显示警告
-optimise Generates faster bytecode by applying optimisations
执行优化
to the program
-print Print program with Scala-specific features removed.
-sourcepath <path> Specify location(s) of source files.
不要以为这是用来声明源文件的路径
-target:<target> Target platform for object files. All JVM 1.5 targe
ts are deprecated. (jvm-1.5,jvm-1.5-fjbg,jvm-1.5-asm,jvm-1.6,jvm-1.7,msil) defau
lt:jvm-1.6
-toolcp <path> Add to the runner classpath.
-unchecked Enable additional warnings where generated code dep
ends on assumptions.
-uniqid Uniquely tag all identifiers in debugging output.
-usejavacp Utilize the java.class.path in classpath resolution
.
-verbose Output messages about what the compiler is doing.
以冗长的方式,打印编译起正在做什么
-version Print product version and exit.
@<file> A text file containing compiler arguments (options
and source files)
以文件的方式传递编译参数
Deprecated settings:
-make:<policy> Recompilation detection policy (all,changed,immedia
te,transitive,transitivenocp) default:all
deprecated: this option is unmaintained. Use sbt
or an IDE for selective recompilation.
Options for plugin ‘continuations‘:
-P:continuations:enable Enable continuations
------------------------------------
scalac -d test.jar D:\abc\def\*
scala -cp test.jar MainObject
Scalac 命令