This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes unix home user directory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "unix home user directory" Watch "unix home user directory" New topic

unix home user directory

Justyna Wozniak

Joined: Oct 04, 2006
Posts: 14
this question comes from JQPlus:

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


package com.enthu;

class A





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 and files are supposed to be visible to the compiler as the path is set to /home and not /home/user ?

Justyna Wozniak
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2367
The path specified with -d simply indicates where the .class will be placed. It does not specify where the .java files are.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: unix home user directory
It's not a secret anymore!