Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: Death To Sub-Sub-Sub-Directories! Date: Wed, 04 May 2011 22:36:30 -0400 Organization: albasani.net Lines: 24 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: news.albasani.net mihc8PSDyFVaZBFA6M/mZlo+zUn2sppCtpyRzgulfVHeLfoaM0ty8wR9c9tssZwIf75K9tAYxItcMMcAmdqgbA== NNTP-Posting-Date: Thu, 5 May 2011 02:35:17 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="VyC+tfojSVfZ24swvIJT4h+SU2qVkn5hrheqev/kVi+EEZ+E7lTd0AzKooL33ZFzirnWmetYuNhS95EM5Yn7v5MgBFnWXFTyCoCGhELv0s/0WiCLwC0AtkS5NKZXuXNH"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 In-Reply-To: Cancel-Lock: sha1:po+sSd0IEN28cswVje+93rLu/zo= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:3534 Lawrence D'Oliveiro wrote: > Google’s tool for creating an Android project insists on creating a > subdirectory hierarchy corresponding to the package naming hierarchy. Thus, > if you name your class “com.example.test_project.Main”, it will put > Main.java inside the subdirectory src/com/example/test_project/. > > But it turns out no part of the build process depends on this: you can put > all source files at the top level of your “src” subdirectory, and the > project still builds just fine. This is simply the normal behavior for file-system-based Java installations, such as those on Windows, Linux, Solaris, and Mac. No surprise, since Android is built on a Linux core (well, GNU OS, I suppose I should say). While it is not true that anything or anyone "insists" on using a reasonable package structure, or to utterly eschew the default package, it's awfully foolish to build anything other than toy examples in the default package. That's why the very strong bias is to the best practice of non-default packages for all types. You should follow that practice. -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg