• 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
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

file organization (directory structure)

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is somewhat of a preference thing, but can anyone
post how they setup their directories for source and compilation.
i.e:
/projects/myproject1/ main dir
/projects/myproject1/src source files
/projects/myproject1/resourse resource (image, config) files
etc..
something like that.. ?
where do you put your class files
how do you package everything if you are going to distribute
it all.
thanks
 
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I generally put all class files in the root directory of the project. \projects\myProject\
I put any images together. \projects\myProject\Images\
I also group together text/config files. \projects\myProject\config\
The only text file I allow in my root directory of the project is the one I use for the manifest.
-Jason
 
ken brooks
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks
so when you compile you just compile everything to the
root dir?
-ken
 
Ranch Hand
Posts: 3141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ken,
The following setup works well for me:
\javadev\
\javadev\src
\javadev\src\project1
\javadev\src\project2
...etc
All the .java files have package names and are kept in their respective 'src' directory.
When compiling, start in 'javadev' and use 'javac -d . src\...'
The .class files end up in directories matching their package names. Note, the package names can be whatever you want; don't have to match the '\src\project\' names. And if you do a new version, ie 'src\project1\v1' you can just copy the original source over to the new directory; make your changes and compile. Don't have to change package names so if you mess things up it's easy to recompile your original and get back to working code.

 
reply
    Bookmark Topic Watch Topic
  • New Topic