Re: Compiling -- Can I Control Where .java and .class Files Are Kept?

From: Hal Vaughan (hal_at_thresholddigital.com)
Date: 11/25/03


Date: Tue, 25 Nov 2003 08:14:24 GMT

Jonas Kongslund wrote:

> Hal Vaughan wrote:
>
>> Is there any way to tell javac that all .class files should be put in the
>> bin dir?
>
> Use the -d switch
>
> $ javac -help
> Usage: javac <options> <source files>
> where possible options include:
> -g Generate all debugging info
> -g:none Generate no debugging info
> -g:{lines,vars,source} Generate only some debugging info
> -nowarn Generate no warnings
> -verbose Output messages about what the compiler is
> doing
> -deprecation Output source locations where deprecated APIs
> are used
> -classpath <path> Specify where to find user class files
> -sourcepath <path> Specify where to find input source files
> -bootclasspath <path> Override location of bootstrap class files
> -extdirs <dirs> Override location of installed extensions
> -d <directory> Specify where to place generated class files
> -encoding <encoding> Specify character encoding used by source
> files
> -source <release> Provide source compatibility with specified
> release
> -target <release> Generate class files for specific VM version
> -help Print a synopsis of standard options
>

Thought I did that, but when I tried it, I realized that I had read the help
for java, not javac. Thanks.

Hal



Relevant Pages

  • Re: Beginner Package Help Please
    ... >> into problems with old .class files in your classpath. ... >> all uncommon. ... > when executing javac.. ...
    (comp.lang.java.programmer)
  • about classpath setting
    ... packages.I created a directory in bin with the package name and then my ... files are stored in that directory.But when i am compiling the program ... javac is not known and when i am compiling in the bin directory i am ... getting the error class not found.According to the book i have to set ...
    (comp.lang.java.help)
  • Re: How Javac works
    ... > don't force me to use Java 1.5 when I don't really need it. ... > If I delete all the class files in the universe, and compile one class ... the class files are not there yet. ... Try the -verbose switch with javac. ...
    (comp.lang.java.programmer)
  • Re: javac -server
    ... On Tue, 31 Aug 2004 18:20:54 GMT, Frank wrote: ... javac was class files, the -server option ... > compilation process. ...
    (comp.lang.java.programmer)
  • Re: javac -server
    ... >>Guessing that since javac is just a java program, ... > javac was class files, ... and start the compiler, passing the command-line arguments to it. ...
    (comp.lang.java.programmer)