Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #24628
| From | Martin Gregorie <martin@address-in-sig.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Package naming, disk organization |
| Date | 2013-07-04 20:40 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <kr4mkr$j9p$1@dont-email.me> (permalink) |
| References | <kqssv3$dfm$1@speranza.aioe.org> <kquqfj$38p$1@speranza.aioe.org> <kr2q7l$fdd$1@dont-email.me> <51D5A431.4060001@fastmail.fm> |
On Thu, 04 Jul 2013 12:34:57 -0400, Dave wrote: > On 07/03/2013 11:35 PM, markspace wrote: >> I still don't like the split between src and class at the top level. >> It's weird, and as others have pointed out you'll fight most tools >> (IDEs, etc.) to do it this way. Easier is project_name/src and >> project_name/build/classes. >> Same here - and I've never bothered with any attempt to separate .java files from the rest of the compiler output. All the tools (javac, ant, javadocs etc.) can work very nicely with this mix. I know some C programmers like to separate source from object, but in Java its really just as easy to leave them in the same place. ant, in particular, is even has a notation, "org/**/*.class", which means "walk the directory tree whose root is 'org' and apply this operation to every class file in the tree. IOW, if it was building a jarfile, it would include all the directories and class files while omitting any other files in the tree. >> Getting a domain name is the absolute least of your concerns. >> Indeed, though there is an Internet convention that .co.uk and .com should be used if you intend to sell stuff from your domain but that non- profit organisations are better placed in .org.uk or .org > I should also point out that I'm a tad old fashion (I guess) because I > use an editor and command line. I do plan to go to an IDE - once I'm > told which one everyone wants to use. > I should add that I don't usually use an IDE: I find that my needs are nicely met by a decent multi-buffering text editor and ant (the Javan equivalent of make). > Ok, back to the subject. I want to obey the conventions, but not box > myself in or create future problems. So how about: > * domain (used for general Java development for now): dboland * source: > home/user/javadev/dboland/proj_name/src * classes: > home/user/javadev/dboland/proj_name/classes > // I don't get the need for build/classes. > * CLASSPATH: home/user/javadev/dboland > I maintain a separate directory where I place jar files, /home/java/jarlib and put that in the CLASSPATH During development I don't bother with project jar files, but run everything from the project directory: My login directory: /home/user My project directory: /home/user/project Typical package name: org.gregorie.project .java, .class files etc: /home/user/project/org/gregorie/project/*.class so, if I'm in ~/project, running 'ant' will compile any changed classes and then running "java org/gregorie/project/MainClass" will run the newly compiled stuff. Similarly, ant can run 'jar' and build a correct jarfile in ~/project using a manifest that would also be in ~/project. Last, nut not least, ~/project is the base module directory for CVS (or any other version control system. > Comments? > HTH -- martin@ | Martin Gregorie gregorie. | Essex, UK org |
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Package naming, disk organization Dave <dboland9@fastmail.fm> - 2013-07-01 17:39 -0400
Re: Package naming, disk organization markspace <markspace@nospam.nospam> - 2013-07-01 15:22 -0700
Re: Package naming, disk organization Martin Gregorie <martin@address-in-sig.invalid> - 2013-07-01 23:56 +0000
Re: Package naming, disk organization Roedy Green <see_website@mindprod.com.invalid> - 2013-07-01 15:35 -0700
Re: Package naming, disk organization Roedy Green <see_website@mindprod.com.invalid> - 2013-07-01 15:36 -0700
Re: Package naming, disk organization Lew <lewbloch@gmail.com> - 2013-07-01 17:22 -0700
Re: Package naming, disk organization Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2013-07-02 18:51 +0300
Re: Package naming, disk organization Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-07-18 23:50 -0300
Re: Package naming, disk organization Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-07-01 21:30 -0400
Re: Package naming, disk organization markspace <markspace@nospam.nospam> - 2013-07-01 18:43 -0700
Re: Package naming, disk organization Dave <dboland9@fastmail.fm> - 2013-07-02 11:09 -0400
Re: Package naming, disk organization Arne Vajhøj <arne@vajhoej.dk> - 2013-07-03 22:53 -0400
Re: Package naming, disk organization markspace <markspace@nospam.nospam> - 2013-07-03 20:35 -0700
Re: Package naming, disk organization Dave <dboland9@fastmail.fm> - 2013-07-04 12:34 -0400
Re: Package naming, disk organization Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2013-07-04 20:08 +0300
Re: Package naming, disk organization lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-07-04 18:24 +0100
Re: Package naming, disk organization Lew <lewbloch@gmail.com> - 2013-07-04 11:26 -0700
Re: Package naming, disk organization Arne Vajhøj <arne@vajhoej.dk> - 2013-07-04 15:42 -0400
Re: Package naming, disk organization Martin Gregorie <martin@address-in-sig.invalid> - 2013-07-04 20:40 +0000
Re: Package naming, disk organization Lew <lewbloch@gmail.com> - 2013-07-04 14:01 -0700
Re: Package naming, disk organization Arne Vajhøj <arne@vajhoej.dk> - 2013-07-04 17:06 -0400
Re: Package naming, disk organization Arne Vajhøj <arne@vajhoej.dk> - 2013-07-04 15:39 -0400
csiph-web