This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java on Unix: /home or /usr ?

 
Gabriel Cane
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Greg Brouelette
Ranch Hand
Posts: 144
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic