Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx01.iad01.newshosting.com!newshosting.com!69.16.185.11.MISMATCH!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: filenames on the command line Date: Thu, 1 Dec 2011 09:01:47 -0800 (PST) Organization: http://groups.google.com Lines: 37 Message-ID: <3542558.42.1322758907619.JavaMail.geo-discussion-forums@prfi36> References: <7ea0b15a-e937-4fb8-9045-f5ffca1cf6de@u6g2000vbg.googlegroups.com> <2304640.475.1322751289109.JavaMail.geo-discussion-forums@prfx15> <3e86463f-a024-4307-bd31-230bb1b4041f@m7g2000vbc.googlegroups.com> Reply-To: comp.lang.java.programmer@googlegroups.com NNTP-Posting-Host: 67.218.106.40 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1322758907 16211 127.0.0.1 (1 Dec 2011 17:01:47 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 1 Dec 2011 17:01:47 +0000 (UTC) In-Reply-To: <3e86463f-a024-4307-bd31-230bb1b4041f@m7g2000vbc.googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=67.218.106.40; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T User-Agent: G2/1.0 X-Google-Web-Client: true Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:10405 On Thursday, December 1, 2011 7:46:10 AM UTC-8, giuseppe.on.usenet wrote: > On 1 Dic, 15:54, Lew wrote: > > giuseppe.on.usenet wrote: > > > The current directory has two files: > > > > That's your first mistake - using the current directory. > > > > I am studying for an Oracle certification and I found this exercise in > a book. There are at least five similar questions and all of them put > the classes in the same directory, even if they belong to different > packages. I agree with you that this is not the best practice but it > is not my fault if the quiz is conceived that way. It's not "not a best practice", it's the wrong way to do it. It is your fault if you fail to learn the truth of what Java does. > > [...] > > Why don't you read the documentation? > > > > You will find it astonishingly helpful. > > Three books + the man page should be enough but if I had found the > answer there I wouldn't have posted here. Oracle's Java site has the best fundamental data and generally easiest to get to, plus it's authoritative. Everyone should have bookmarks to the tools documentation http://docs.oracle.com/javase/7/docs/ (or use http://lmgtfy.com/?q=java+tools+documentation) specifically http://docs.oracle.com/javase/7/docs/technotes/tools/index.html#basic "You should arrange source files in a directory tree that reflects their package tree. For example, if you keep all your source files in /workspace, the source code for com.mysoft.mypack.MyClass should be in /workspace/com/mysoft/mypack/MyClass.java." The tutorials give the same information. -- Lew