Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 07-20-2012, 08:18 AM   #1
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, 09:39 AM   #2
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

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


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 12:02 PM
Using VBS on Linux to get environment variables squinn Linux - General 1 11-21-2005 11:11 PM
Environment variables in linux redhat 9 neerajchaudhari Linux - Newbie 1 07-27-2005 01:27 AM
Linux Environment variables gugamare Linux - Software 5 12-31-2004 11:19 AM
linux environment variables? doris Linux - General 3 08-04-2001 09:42 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:20 PM.

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