Re: Package and compiling

From: Raymond DeCampo (rdecampo_at_spam-I-am-not.twcny.rr.com)
Date: 02/18/04

  • Next message: Craig S. Ugoretz: "The Wisdom Seeker IDe, an open source software development project for all"
    Date: Wed, 18 Feb 2004 01:07:17 GMT
    
    

    Isa wrote:
    > Hi!
    > I have a question about the package and Java class files. I hope someone can
    > answar me. When I compile a java source file with a package statement I
    > expect that the compiler should create the package directories and put the
    > class file there.
    > For example:
    >
    > package homecompany.utilies;
    > public class graph{
    > ...
    > }
    >
    > The command C:\ javac graph.java compiles and create the class file
    > graph.class
    > in the same directory. I suppose that the class file graph.class should
    > placed in the
    > directory C:\homecompany\utilies\, but it does not. The development env. is
    > windows xp with Java SDK 1.4_2.
    >
    > Thanks to any comment
    > Isa
    >

    First, get the JDK documentation from Sun. Part of the documentation is
    "Tool Documentation" and that will tell you lots of things about javac,
    java, etc.

    What you want is the -d option to javac.

    Ray


  • Next message: Craig S. Ugoretz: "The Wisdom Seeker IDe, an open source software development project for all"

    Relevant Pages

    • Re: Package and compiling
      ... When I compile a java source file with a package statement I ... > class file there. ...
      (comp.lang.java)
    • Re: Java server wont run after reboot
      ... Working with classpaths in Java isn't too hard, ... package definitions in your source code. ... Execute from that directory, no classpath definition needed. ... Assuming that you compile your code in the same directory and deposit the ...
      (RedHat)
    • Re: netbeans packages and directory structure SNAFU
      ... Have you ever read the Java Tutorial? ... public class SomeClass ... If you put it in a package like so: ... you can still compile it anywhere via "javac SomeClass.java". ...
      (comp.lang.java.help)
    • Re: Producing a binary install
      ... It did bomb once, about 4 hours into the compile, and demanded I ... Java, and other packages are not available in pre-compiled form. ... install for her over the net, and then do the rest of the install ... Otherwise doing a 'make package' after the port has been installed will create a package for you. ...
      (freebsd-questions)
    • Re: Alternative to JVM
      ... compile class file, but can run Java program with help of a different ... language grammer tree to a 2-address / 3-address instruction set. ... class file from Parse Tree directly. ...
      (comp.lang.java.machine)