Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello guys,
I have a system where Java 1.5.x has already been installed and Tomcat 5 has already been configured. Now I want to install another application that asks for JAVA_HOME variable. When I try to echo $JAVA_HOME, it prints blank. That means JAVA_HOME is not set. But I think Java path is set in PATH environment variable since I can invoke Java compiler from root. But I want exact Java Installation Path so that I can set JAVA_HOME.
So, how can I make a search for a Java Installation Directory? For you people reference, my PATH variable gives me:
Thanks guys, it worked! Actually I am new to linux so don't know these basic commands. People say that linux is great but a bit difficult for being so much Command oriented, unlike Windows which is more user friendly I STILL THINK. But learning it now.
Anyways!!! I have got some confusion, rather I want some explanation. j-ray, can u explain this command in more detail to me?
locate java | grep SunJava2-1.5
I got an error when I run this command....
Could not open database /var/lib/slocate/slocate.db
How should i tackle with this error?
Thanks again to all of you for your help.
Last edited by chillyroll; 12-06-2006 at 11:10 PM.
Anyways!!! I have got some confusion, rather I want some explanation. j-ray, can u explain this command in more detail to me?
locate java | grep SunJava2-1.5
I got an error when I run this command....
Could not open database /var/lib/slocate/slocate.db
That just means that the database listing of your files is outdated. Run "sudo updatedb" and that should be fixed. Anyways, the command "locate" looks for any instance of the search phrase (in this case: java) and prints it out. By using the pipe ("|"), you're passing what's printed out to the next command ("grep SunJava2-1.5"). grep is used to limit the output to whatever you specify (in this case: anything that has SunJava2-1.5 in the filename. Hope that helps.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.