• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

unix home user directory

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
this question comes from JQPlus:

Consider the following two java files in /home/user directory:

//file A.java

package com.enthu;

class A

{

}



//file B.java

package com.foo;

class B

{

}



The files are compiled using the following command line:



javac -d /home *.java



Where will the class files go?


The answer they give is:
"A.class in /home/com/enthu and B.class in /home/com/foo"

but I don't see why the A.java and B.java files are supposed to be visible to the compiler as the path is set to /home and not /home/user ?

Thanks,
Justyna Wozniak
 
Ranch Hand
Posts: 2412
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The path specified with -d simply indicates where the .class will be placed. It does not specify where the .java files are.
 
reply
    Bookmark Topic Watch Topic
  • New Topic