• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Java on Unix: /home or /usr ?

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a question for those of you who develop on a unix-based OS, such as Linux or FreeBSD.
Did you install your Java environment (JDK, J2EE, ant, junit, etc) in your /home directories, or did you install in a system directory, such as /usr/local?
The reason I'm asking is to know which is the best method in terms of saving disk space, user permissions, and finally, deployment of the application.
Also, if you're testing a servlet-based application, running tomcat, for example, would it be better to have tomcat running from /home, so that you wouldn't have to switch to root everytime you want to compile?
Any thoughts, perspectives or experiences will be appreciated.
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is a matter of perspective, more than anything else. In projects to which several people contribute, a system view is far more appropriate. If you're doing it all yourself, and not planning to incorporate other workers when you scale, why not save yourself the switch-user action and speed things up.
Personally, I like to hope for the best (more help) and plan for the worst (recovering data in a bad crash) -- in both views, I prefer seeing Tomcat as a "system service," i.e., located in /usr/local or perhaps even /opt.
 
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a /usr/share/java directory Under that I have a j2skd1.4.0 directory for my SDK as well as other directories for jakarta ant, log4j and so on.
I then use "chgrp" to set the group for these directories to "java" (remember to do it recursivly) and then make my users members of the java group.
That seems to work well for me.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic