"Fossies" - the Fresh Open Source Software Archive

Member "scala-2.13.9/doc/tools/scalac.html" (19 Sep 2022, 18365 Bytes) of package /windows/misc/scala-2.13.9.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) HTML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

A hint: This file contains one or more very long lines, so maybe it is better readable using the pure text view mode that shows the contents as wrapped lines within the browser window.


    1 <?xml version="1.1" encoding="iso-8859-1"?>
    2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    4 
    5 <head>
    6 <title>scalac man page</title>
    7 <meta http-equiv="Content-Language" content="en"/>
    8 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    9 <meta name="Author" content="Stephane Micheloud"/>
   10 <style type="text/css">
   11   <!--
   12   blockquote, pre { margin:1em 4em 1em 4em; }
   13   dt { margin: 0.6em 0 0 0; }
   14   p { margin:0.6em 2em 0.6em 2em; text-align:justify; }
   15   //-->
   16 </style>
   17 </head>
   18 
   19 <body>
   20 <!-- header -->
   21 <div style="margin: 0 0 2em 0;">
   22 <div style="float:left;">
   23 scalac(1)
   24 </div>
   25 <div style="float:right;">
   26 scalac(1)
   27 </div>
   28 <div style="text-align:center;">
   29 USER COMMANDS
   30 </div>
   31 </div>
   32 
   33 <h3 id="name">NAME</h3>
   34 <p>
   35 <code><b>scalac</b></code> &#8211; Compiler for the <a href="https://scala-lang.org/">Scala 2</a> language</p>
   36 
   37 <h3 id="synopsis">SYNOPSIS</h3>
   38 <p>
   39 <code><b>scalac</b></code><code>  [ &lt;<i>options</i>&gt; ] &lt;<i>source files</i>&gt;</code></p>
   40 
   41 <h3 id="parameters">PARAMETERS</h3>
   42 <p>
   43 <ins><dl>
   44 <dt>
   45 <code>&lt;<i>options</i>&gt;</code>
   46 </dt>
   47 <dd>
   48 Command line options. See <a href="#options"><b>OPTIONS</b></a> below.</dd>
   49 <dt>
   50 <code>&lt;<i>source files</i>&gt;</code>
   51 </dt>
   52 <dd>
   53 One or more source files to be compiled (such as <code>MyClass.scala</code>).</dd>
   54 </dl></ins>
   55 </p>
   56 
   57 <h3 id="description">DESCRIPTION</h3>
   58 <p>
   59 The <code><b>scalac</b></code> tool reads class and object definitions, written in the Scala programming language, and compiles them into bytecode class files.</p>
   60 <p>
   61 By default, the compiler puts each class file in the same directory as its source file. You can specify a separate destination directory with -d (see <a href="#options"><b>OPTIONS</b></a>, below).</p>
   62 
   63 <h3 id="options">OPTIONS</h3>
   64 <p>
   65 The compiler has a set of standard options that are supported on the current development environment and will be supported in future releases. An additional set of non-standard options are specific to the current virtual machine implementation and are subject to change in the future.  Non-standard options begin with <code><b>-X</b></code>.</p>
   66 
   67 <h4 id="standard_options">Standard Options</h4>
   68 <p>
   69 <ins><dl>
   70 <dt>
   71 <code><b>&#8211;D</b>property=value </code>
   72 </dt>
   73 <dd>
   74 Pass <code><b>&#8211;D</b>property=value </code> directly to the runtime system.</dd>
   75 <dt>
   76 <code><b>&#8211;J</b>&lt;<i>flag</i>&gt; </code>
   77 </dt>
   78 <dd>
   79 Pass <code>&lt;<i>flag</i>&gt;</code> directly to the runtime system.</dd>
   80 <dt>
   81 <code><b>&#8211;P:</b>&lt;<i>plugin:opt</i>&gt; </code>
   82 </dt>
   83 <dd>
   84 Pass an option to a plugin</dd>
   85 <dt>
   86 <code><b>&#8211;X</b> </code>
   87 </dt>
   88 <dd>
   89 Print a synopsis of advanced options.</dd>
   90 <dt>
   91 <code><b>&#8211;bootclasspath</b> &lt;<i>path</i>&gt; </code>
   92 </dt>
   93 <dd>
   94 Override location of bootstrap class files (where to find the standard built-in classes, such as "<code>scala.List</code>").</dd>
   95 <dt>
   96 <code><b>&#8211;classpath</b> &lt;<i>path</i>&gt; </code>
   97 </dt>
   98 <dd>
   99 <div>
  100 Specify where to find user class files (on Unix-based systems a colon-separated list of paths, on Windows-based systems, a semicolon-separated list of paths). This does not override the built-in (<code>"boot"</code>) search path.
  101 </div>
  102 <div>
  103 The default class path is the current directory. Setting the <code>CLASSPATH</code> variable or using the <code>-classpath</code> command-line option overrides that default, so if you want to include the current directory in the search path, you must include <code>"."</code> in the new settings.
  104 </div>
  105 </dd>
  106 <dt>
  107 <code><b>&#8211;d</b> &lt;<i>directory|jar</i>&gt; </code>
  108 </dt>
  109 <dd>
  110 Specify where to place generated class files.</dd>
  111 <dt>
  112 <code><b>&#8211;deprecation</b> </code>
  113 </dt>
  114 <dd>
  115 <div>
  116 Emit warning and location for usages of deprecated APIs.
  117 </div>
  118 <div>
  119 Available since Scala version 2.2.1
  120 </div>
  121 </dd>
  122 <dt>
  123 <code><b>&#8211;encoding</b> &lt;<i>encoding</i>&gt; </code>
  124 </dt>
  125 <dd>
  126 <div>
  127 Specify character encoding used by source files.
  128 </div>
  129 <div>
  130 The default value is platform-specific (Linux: <code>"UTF8"</code>, Windows: <code>"Cp1252"</code>). Executing the following code in the Scala REPL will return the default value on your system:
  131 </div>
  132 <div>
  133 <code><b>    scala&gt; </b></code><code>new java.io.InputStreamReader(System.in).getEncoding</code>
  134 </div>
  135 </dd>
  136 <dt>
  137 <code><b>&#8211;explaintypes</b> </code>
  138 </dt>
  139 <dd>
  140 Explain type errors in more detail.</dd>
  141 <dt>
  142 <code><b>&#8211;extdirs</b> &lt;<i>dirs</i>&gt; </code>
  143 </dt>
  144 <dd>
  145 Override location of installed extensions.</dd>
  146 <dt>
  147 <code><b>&#8211;feature</b> </code>
  148 </dt>
  149 <dd>
  150 Emit warning and location for usages of features that should be imported explicitly.</dd>
  151 <dt>
  152 <code><b>&#8211;g:</b>{none,source,line,vars,notailcalls} </code>
  153 </dt>
  154 <dd>
  155 <div>
  156 <code>"none"</code> generates no debugging info,
  157 </div>
  158 <div>
  159 <code>"source"</code> generates only the source file attribute,
  160 </div>
  161 <div>
  162 <code>"line"</code> generates source and line number information,
  163 </div>
  164 <div>
  165 <code>"vars"</code> generates source, line number and local variable information,
  166 </div>
  167 <div>
  168 <code>"notailcalls"</code> generates all of the above and <i>will not</i> perform tail call optimization.
  169 </div>
  170 </dd>
  171 <dt>
  172 <code><b>&#8211;help</b> </code>
  173 </dt>
  174 <dd>
  175 Print a synopsis of standard options.</dd>
  176 <dt>
  177 <code><b>&#8211;javabootclasspath</b> &lt;<i>path</i>&gt; </code>
  178 </dt>
  179 <dd>
  180 Override Java boot classpath.</dd>
  181 <dt>
  182 <code><b>&#8211;javaextdirs</b> &lt;<i>path</i>&gt; </code>
  183 </dt>
  184 <dd>
  185 Override Java extdirs classpath.</dd>
  186 <dt>
  187 <code><b>&#8211;language:</b>&lt;<i>feature</i>&gt; </code>
  188 </dt>
  189 <dd>
  190 Enable one or more language features.</dd>
  191 <dt>
  192 <code><b>&#8211;no-specialization</b> </code>
  193 </dt>
  194 <dd>
  195 Ignore <code><i>@specialize</i></code> annotations.</dd>
  196 <dt>
  197 <code><b>&#8211;nobootcp</b> </code>
  198 </dt>
  199 <dd>
  200 Do not use the boot classpath for the Scala jar files.</dd>
  201 <dt>
  202 <code><b>&#8211;nowarn</b> </code>
  203 </dt>
  204 <dd>
  205 Generate no warnings</dd>
  206 <dt>
  207 <code><b>&#8211;optimise</b> </code>
  208 </dt>
  209 <dd>
  210 Generates faster bytecode by applying optimisations to the program.</dd>
  211 <dt>
  212 <code><b>&#8211;print</b> </code>
  213 </dt>
  214 <dd>
  215 Print program with all Scala-specific features removed.</dd>
  216 <dt>
  217 <code><b>&#8211;sourcepath</b> &lt;<i>path</i>&gt; </code>
  218 </dt>
  219 <dd>
  220 Specify location(s) of source files.</dd>
  221 <dt>
  222 <code><b>&#8211;target:</b>{jvm-1.8} </code>
  223 </dt>
  224 <dd>
  225 <div>
  226 <code>"jvm-1.8"</code> target JVM 1.8 (default)
  227 </div>
  228 </dd>
  229 <dt>
  230 <code><b>&#8211;toolcp</b> &lt;<i>path</i>&gt; </code>
  231 </dt>
  232 <dd>
  233 Add to the runner classpath.</dd>
  234 <dt>
  235 <code><b>&#8211;unchecked</b> </code>
  236 </dt>
  237 <dd>
  238 <div>
  239 Enable detailed unchecked (erasure) warnings
  240 </div>
  241 <div>
  242 Non variable type-arguments in type patterns are unchecked since they are eliminated by erasure
  243 </div>
  244 <div>
  245 Available since Scala version 2.3.0
  246 </div>
  247 </dd>
  248 <dt>
  249 <code><b>&#8211;uniqid</b> </code>
  250 </dt>
  251 <dd>
  252 Uniquely tag all identifiers in debugging output.</dd>
  253 <dt>
  254 <code><b>&#8211;usejavacp</b> </code>
  255 </dt>
  256 <dd>
  257 Utilize the java.class.path in classpath resolution.</dd>
  258 <dt>
  259 <code><b>&#8211;usemanifestcp</b> </code>
  260 </dt>
  261 <dd>
  262 Utilize the manifest in classpath resolution.</dd>
  263 <dt>
  264 <code><b>&#8211;verbose</b> </code>
  265 </dt>
  266 <dd>
  267 Output messages about what the compiler is doing</dd>
  268 <dt>
  269 <code><b>&#8211;version</b> </code>
  270 </dt>
  271 <dd>
  272 Print product version and exit.</dd>
  273 <dt>
  274 <code><b>@</b>&lt;<i>file</i>&gt;</code>
  275 </dt>
  276 <dd>
  277 A text file containing compiler arguments (options and source files)</dd>
  278 </dl></ins>
  279 </p>
  280 
  281 <h4 id="advanced_options">Advanced Options</h4>
  282 <p>
  283 <ins><dl>
  284 <dt>
  285 <code><b>&#8211;Xcheckinit</b> </code>
  286 </dt>
  287 <dd>
  288 Wrap field accessors to throw an exception on uninitialized access.</dd>
  289 <dt>
  290 <code><b>&#8211;Xdev</b> </code>
  291 </dt>
  292 <dd>
  293 Enable warnings for developers working on the Scala compiler</dd>
  294 <dt>
  295 <code><b>&#8211;Xdisable-assertions</b> </code>
  296 </dt>
  297 <dd>
  298 Generate no assertions and assumptions</dd>
  299 <dt>
  300 <code><b>&#8211;Xelide-below</b> &lt;<i>n</i>&gt; </code>
  301 </dt>
  302 <dd>
  303 Calls to <code><i>@elidable</i></code> methods are omitted if method priority is lower than argument.</dd>
  304 <dt>
  305 <code><b>&#8211;Xfatal-warnings</b> </code>
  306 </dt>
  307 <dd>
  308 Fail the compilation if there are any warnings.</dd>
  309 <dt>
  310 <code><b>&#8211;Xfull-lubs</b> </code>
  311 </dt>
  312 <dd>
  313 Retain pre 2.10 behavior of less aggressive truncation of least upper bounds.</dd>
  314 <dt>
  315 <code><b>&#8211;Xgenerate-phase-graph</b> &lt;<i>file</i>&gt; </code>
  316 </dt>
  317 <dd>
  318 Generate the phase graphs (outputs .dot files) to fileX.dot.</dd>
  319 <dt>
  320 <code><b>&#8211;Xlint</b> </code>
  321 </dt>
  322 <dd>
  323 Enable recommended additional warnings.</dd>
  324 <dt>
  325 <code><b>&#8211;Xlog-free-terms</b> </code>
  326 </dt>
  327 <dd>
  328 Print a message when reification creates a free term.</dd>
  329 <dt>
  330 <code><b>&#8211;Xlog-free-types</b> </code>
  331 </dt>
  332 <dd>
  333 Print a message when reification resorts to generating a free type.</dd>
  334 <dt>
  335 <code><b>&#8211;Xlog-implicit-conversions</b> </code>
  336 </dt>
  337 <dd>
  338 Print a message whenever an implicit conversion is inserted.</dd>
  339 <dt>
  340 <code><b>&#8211;Xlog-reflective-calls</b> </code>
  341 </dt>
  342 <dd>
  343 Print a message when a reflective method call is generated.</dd>
  344 <dt>
  345 <code><b>&#8211;Xmacro-settings:</b>&lt;<i>option</i>&gt; </code>
  346 </dt>
  347 <dd>
  348 Custom settings for macros.</dd>
  349 <dt>
  350 <code><b>&#8211;Xmain-class</b> &lt;<i>path</i>&gt; </code>
  351 </dt>
  352 <dd>
  353 Class for manifest's Main-Class entry (only useful with -d &lt;jar&gt;).</dd>
  354 <dt>
  355 <code><b>&#8211;Xmigration:</b>&lt;<i>version</i>&gt; </code>
  356 </dt>
  357 <dd>
  358 Warn about constructs whose behavior may have changed since&lt;<i>version</i>&gt;.</dd>
  359 <dt>
  360 <code><b>&#8211;Xno-forwarders</b> </code>
  361 </dt>
  362 <dd>
  363 Do not generate static forwarders in mirror classes.</dd>
  364 <dt>
  365 <code><b>&#8211;Xno-patmat-analysis</b> </code>
  366 </dt>
  367 <dd>
  368 Don't perform exhaustivity/unreachability analysis. Also, ignore <code><i>@switch</i></code> annotation.</dd>
  369 <dt>
  370 <code><b>&#8211;Xjline</b> </code>
  371 </dt>
  372 <dd>
  373 The JLine keybindings to use: emacs/vi/off.</dd>
  374 <dt>
  375 <code><b>&#8211;Xplugin:</b>&lt;<i>paths</i>&gt; </code>
  376 </dt>
  377 <dd>
  378 Load a plugin from each classpath.</dd>
  379 <dt>
  380 <code><b>&#8211;Xplugin-disable:</b>&lt;<i>plugin</i>&gt; </code>
  381 </dt>
  382 <dd>
  383 Disable plugins by name.</dd>
  384 <dt>
  385 <code><b>&#8211;Xplugin-list</b> </code>
  386 </dt>
  387 <dd>
  388 Print a synopsis of loaded plugins.</dd>
  389 <dt>
  390 <code><b>&#8211;Xplugin-require:</b>&lt;<i>plugin</i>&gt; </code>
  391 </dt>
  392 <dd>
  393 Abort if a named plugin is not loaded.</dd>
  394 <dt>
  395 <code><b>&#8211;Xpluginsdir</b> &lt;<i>path</i>&gt; </code>
  396 </dt>
  397 <dd>
  398 Path to search for plugin archives.</dd>
  399 <dt>
  400 <code><b>&#8211;Vprint:</b>&lt;<i>phases</i>&gt; </code>
  401 </dt>
  402 <dd>
  403 Print out program after &lt;<i>phases</i>&gt; (see below).</dd>
  404 <dt>
  405 <code><b>&#8211;Vprint-pos</b> </code>
  406 </dt>
  407 <dd>
  408 Print tree positions, as offsets.</dd>
  409 <dt>
  410 <code><b>&#8211;Vprint-types</b> </code>
  411 </dt>
  412 <dd>
  413 Print tree types (debugging option).</dd>
  414 <dt>
  415 <code><b>&#8211;Xprompt</b> </code>
  416 </dt>
  417 <dd>
  418 Display a prompt after each error (debugging option).</dd>
  419 <dt>
  420 <code><b>&#8211;Xresident</b> </code>
  421 </dt>
  422 <dd>
  423 Compiler stays resident, files to compile are read from standard input.</dd>
  424 <dt>
  425 <code><b>&#8211;Xscript</b> &lt;<i>object</i>&gt; </code>
  426 </dt>
  427 <dd>
  428 Treat the source file as a script and wrap it in a main method.</dd>
  429 <dt>
  430 <code><b>&#8211;Xshow-class</b> &lt;<i>class</i>&gt; </code>
  431 </dt>
  432 <dd>
  433 Show internal representation of class.</dd>
  434 <dt>
  435 <code><b>&#8211;Xshow-object</b> &lt;<i>object</i>&gt; </code>
  436 </dt>
  437 <dd>
  438 Show internal representation of object.</dd>
  439 <dt>
  440 <code><b>&#8211;Xshow-phases</b> </code>
  441 </dt>
  442 <dd>
  443 Print a synopsis of compiler phases.</dd>
  444 <dt>
  445 <code><b>&#8211;Xsource:</b>&lt;<i>version</i>&gt; </code>
  446 </dt>
  447 <dd>
  448 Treat compiler input as Scala source for the specified version, see scala/bug#8126.</dd>
  449 <dt>
  450 <code><b>&#8211;Xsource-reader</b> &lt;<i>classname</i>&gt; </code>
  451 </dt>
  452 <dd>
  453 Specify a custom method for reading source files.</dd>
  454 <dt>
  455 <code><b>&#8211;Xstrict-inference</b> </code>
  456 </dt>
  457 <dd>
  458 Don't infer known-unsound types.</dd>
  459 <dt>
  460 <code><b>&#8211;Xverify</b> </code>
  461 </dt>
  462 <dd>
  463 Verify generic signatures in generated bytecode (asm backend only).</dd>
  464 <dt>
  465 <code><b>&#8211;Xxml:</b>{coalescing} </code>
  466 </dt>
  467 <dd>
  468 <div>
  469 Configure XML parsing.
  470 </div>
  471 <div>
  472 <code>"coalescing"</code> convert PCData to Text and coalesce sibling nodes (default in 2.11).
  473 </div>
  474 </dd>
  475 <dt>
  476 <code><b>&#8211;Y</b> </code>
  477 </dt>
  478 <dd>
  479 Print a synopsis of private options.</dd>
  480 </dl></ins>
  481 </p>
  482 
  483 <h4 id="compilation_phases">Compilation Phases</h4>
  484 <p>
  485 <ins><dl>
  486 <dt>
  487 <code><i>parser</i></code>
  488 </dt>
  489 <dd>
  490 parse source into ASTs, perform simple desugaring</dd>
  491 <dt>
  492 <code><i>namer</i></code>
  493 </dt>
  494 <dd>
  495 resolve names, attach symbols to named trees</dd>
  496 <dt>
  497 <code><i>packageobjects</i></code>
  498 </dt>
  499 <dd>
  500 load package objects</dd>
  501 <dt>
  502 <code><i>typer</i></code>
  503 </dt>
  504 <dd>
  505 the meat and potatoes: type the trees</dd>
  506 <dt>
  507 <code><i>patmat</i></code>
  508 </dt>
  509 <dd>
  510 translate match expressions</dd>
  511 <dt>
  512 <code><i>superaccessors</i></code>
  513 </dt>
  514 <dd>
  515 add super accessors in traits and nested classes</dd>
  516 <dt>
  517 <code><i>extmethods</i></code>
  518 </dt>
  519 <dd>
  520 add extension methods for inline classes</dd>
  521 <dt>
  522 <code><i>pickler</i></code>
  523 </dt>
  524 <dd>
  525 serialize symbol tables</dd>
  526 <dt>
  527 <code><i>refchecks</i></code>
  528 </dt>
  529 <dd>
  530 reference/override checking, translate nested objects</dd>
  531 <dt>
  532 <code><i>selectiveanf</i></code>
  533 </dt>
  534 <dd>
  535 ANF pre-transform for <code><i>@cps</i></code> (CPS plugin)</dd>
  536 <dt>
  537 <code><i>selectivecps</i></code>
  538 </dt>
  539 <dd>
  540 <code><i>@cps</i></code>-driven transform of selectiveanf assignments (CPS plugin)</dd>
  541 <dt>
  542 <code><i>uncurry</i></code>
  543 </dt>
  544 <dd>
  545 uncurry, translate function values to anonymous classes</dd>
  546 <dt>
  547 <code><i>tailcalls</i></code>
  548 </dt>
  549 <dd>
  550 replace tail calls by jumps</dd>
  551 <dt>
  552 <code><i>specialize</i></code>
  553 </dt>
  554 <dd>
  555 <code><i>@specialized</i></code>-driven class and method specialization</dd>
  556 <dt>
  557 <code><i>explicitouter</i></code>
  558 </dt>
  559 <dd>
  560 this refs to outer pointers, translate patterns</dd>
  561 <dt>
  562 <code><i>erasure</i></code>
  563 </dt>
  564 <dd>
  565 erase types, add interfaces for traits</dd>
  566 <dt>
  567 <code><i>posterasure</i></code>
  568 </dt>
  569 <dd>
  570 clean up erased inline classes</dd>
  571 <dt>
  572 <code><i>fields</i></code>
  573 </dt>
  574 <dd>
  575 synthesize accessors and fields, including bitmaps for lazy vals</dd>
  576 <dt>
  577 <code><i>lambdalift</i></code>
  578 </dt>
  579 <dd>
  580 move nested functions to top level</dd>
  581 <dt>
  582 <code><i>constructors</i></code>
  583 </dt>
  584 <dd>
  585 move field definitions into constructors</dd>
  586 <dt>
  587 <code><i>flatten</i></code>
  588 </dt>
  589 <dd>
  590 eliminate inner classes</dd>
  591 <dt>
  592 <code><i>mixin</i></code>
  593 </dt>
  594 <dd>
  595 mixin composition</dd>
  596 <dt>
  597 <code><i>cleanup</i></code>
  598 </dt>
  599 <dd>
  600 platform-specific cleanups, generate reflective calls</dd>
  601 <dt>
  602 <code><i>delambdafy</i></code>
  603 </dt>
  604 <dd>
  605 remove lambdas</dd>
  606 <dt>
  607 <code><i>inliner</i></code>
  608 </dt>
  609 <dd>
  610 optimization: do inlining</dd>
  611 <dt>
  612 <code><i>inlineHandlers</i></code>
  613 </dt>
  614 <dd>
  615 optimization: inline exception handlers</dd>
  616 <dt>
  617 <code><i>closelim</i></code>
  618 </dt>
  619 <dd>
  620 optimization: eliminate uncalled closures</dd>
  621 <dt>
  622 <code><i>constopt</i></code>
  623 </dt>
  624 <dd>
  625 optimization: optimize null and other constants</dd>
  626 <dt>
  627 <code><i>dce</i></code>
  628 </dt>
  629 <dd>
  630 optimization: eliminate dead code</dd>
  631 <dt>
  632 <code><i>jvm</i></code>
  633 </dt>
  634 <dd>
  635 generate JVM bytecode</dd>
  636 <dt>
  637 <code><i>terminal</i></code>
  638 </dt>
  639 <dd>
  640 the last phase in the compiler chain</dd>
  641 <dt>
  642 <code><i>all</i></code>
  643 </dt>
  644 <dd>
  645 matches all phases</dd>
  646 </dl></ins>
  647 </p>
  648 
  649 <h3 id="environment">ENVIRONMENT</h3>
  650 <p>
  651 <ins><dl>
  652 <dt>
  653 <code><b>JAVACMD</b></code>
  654 </dt>
  655 <dd>
  656 Specify the <code><b>java</b></code> command to be used for running the Scala code.  Arguments may be specified as part of the environment variable; spaces, quotation marks, etc., will be passed directly to the shell for expansion.</dd>
  657 <dt>
  658 <code><b>JAVA_HOME</b></code>
  659 </dt>
  660 <dd>
  661 Specify JDK/JRE home directory. This directory is used to locate the <code><b>java</b></code> command unless <code><b>JAVACMD</b></code> variable set.</dd>
  662 <dt>
  663 <code><b>JAVA_OPTS</b></code>
  664 </dt>
  665 <dd>
  666 <div>
  667 Specify the options to be passed to the <code><b>java</b></code> command defined by <code><b>JAVACMD</b></code>.
  668 </div>
  669 <div>
  670 One might for example configure the memory usage of the JVM with: <code>JAVA_OPTS="-Xmx2G -Xss16M"</code>
  671 </div>
  672 </dd>
  673 </dl></ins>
  674 </p>
  675 
  676 <h3 id="examples">EXAMPLES</h3>
  677 <p>
  678 <ins><dl>
  679 <dt>
  680 Compile a Scala program to the current directory
  681 </dt>
  682 <dd>
  683 <code><b>scalac</b></code><code> HelloWorld</code></dd>
  684 <dt>
  685 Compile a Scala program to the destination directory <code><b>classes</b></code>
  686 </dt>
  687 <dd>
  688 <code><b>scalac</b></code><code> <code><b>&#8211;d</b> classes </code>HelloWorld.scala</code></dd>
  689 <dt>
  690 Compile a Scala program using a user-defined <code><b>java</b></code> command
  691 </dt>
  692 <dd>
  693 <code><b>env JAVACMD</b></code><code>=/usr/local/bin/cacao </code><code><b>scalac</b></code><code> <code><b>&#8211;d</b> classes </code>HelloWorld.scala</code></dd>
  694 <dt>
  695 Compile all Scala files found in the source directory <code><b>src</b></code> to the destination directory <code><b>classes</b></code>
  696 </dt>
  697 <dd>
  698 <code><b>scalac</b></code><code> <code><b>&#8211;d</b> classes </code>src/*.scala</code></dd>
  699 </dl></ins>
  700 </p>
  701 
  702 <h3 id="exit_status">EXIT STATUS</h3>
  703 <p>
  704 <code><b>scalac</b></code> returns a zero exit status if it succeeds to compile the specified input files. Non zero is returned in case of failure.</p>
  705 
  706 <h3 id="author">AUTHOR</h3>
  707 <p>
  708 Written by Martin Odersky and other members of the <a href="https://www.scala-lang.org/news/2014/01/22/10-years-of-scala.html">Scala team</a>.</p>
  709 
  710 <h3 id="reporting_bugs">REPORTING BUGS</h3>
  711 <p>
  712 Report bugs to <code>https://github.com/scala/bug/issues</code>.</p>
  713 
  714 <h3 id="copyright">COPYRIGHT</h3>
  715 <p>
  716 This is open-source software, available to you under the Apache License 2.0. See accompanying "copyright" or "LICENSE" file for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p>
  717 
  718 <h3 id="see_also">SEE ALSO</h3>
  719 <p>
  720 <a href="fsc.html"><b>fsc</b>(1)</a>, <a href="scala.html"><b>scala</b>(1)</a>, <a href="scaladoc.html"><b>scaladoc</b>(1)</a>, <a href="scalap.html"><b>scalap</b>(1)</a></p>
  721 <!-- footer -->
  722 <div style="margin: 2em 0 0 0;">
  723 <div style="float:left;">
  724 version 1.0
  725 </div>
  726 <div style="float:right;">
  727 scalac(1)
  728 </div>
  729 <div style="text-align:center;">
  730 March 2012
  731 </div>
  732 </div>
  733 </body>
  734 </html>