LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-20-2012, 09:18 AM   #1
sallyde
LQ Newbie
 
Registered: Jul 2012
Posts: 9
Blog Entries: 1

Rep: Reputation: Disabled
Environment variables in linux


Hi All,
I'm using Ubuntu 9.10, and i can run "java --version" and i get Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)
and i can also build and run java programs. but when i want to "echo $JAVA_HOME" i get nothing. this means that this environment variable was not set. so why my java is working correctly? how i can realize the location of my java installation? and the same happened for my Maven installation :-/ i can run "mvn --version" but its corresponding EV is empty :-/
any idea???
 
Old 07-20-2012, 10:39 AM   #2
linux_hunger
LQ Newbie
 
Registered: Jun 2012
Posts: 4

Rep: Reputation: Disabled
you can run your java command directly because its path is in $PATH. To check your location of java command, use

Quote:
which java
It'll print out the path to the executable file.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Set/Get Linux Environment Variables Frederick J. Harris Programming 3 02-10-2008 01:02 PM
Using VBS on Linux to get environment variables squinn Linux - General 1 11-22-2005 12:11 AM
Environment variables in linux redhat 9 neerajchaudhari Linux - Newbie 1 07-27-2005 02:27 AM
Linux Environment variables gugamare Linux - Software 5 12-31-2004 12:19 PM
linux environment variables? doris Linux - General 3 08-04-2001 10:42 AM


All times are GMT -5. The time now is 09:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration