Re: Package and compiling

From: hiwa (HGA03630_at_nifty.ne.jp)
Date: 02/14/04


Date: 14 Feb 2004 02:10:00 -0800


"Isa" <isa.janfada-balu@comhem.se> wrote in message news:<_UaXb.82643$dP1.220245@newsc.telia.net>...
> 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

Mapping between java package and system directory structure is
not automatic default. See Java Language Specification chapter 7.



Relevant Pages

  • 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: Package and compiling
    ... When I compile a java source file with a package statement I ... > class file there. ...
    (comp.lang.java)
  • 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)