Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
05-15-2006, 11:46 PM
|
#1
|
Member
Registered: Sep 2003
Location: Tacoma, WA
Distribution: Mandriva all the way
Posts: 145
Rep:
|
finding out the java version
How do i find out my java version?
I saw something that said
# java --version
but it does not like it.
|
|
|
05-16-2006, 12:28 AM
|
#2
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
I think you have too many dashes - have you tried java -version instead?
|
|
|
05-16-2006, 01:03 PM
|
#3
|
Member
Registered: Sep 2003
Location: Tacoma, WA
Distribution: Mandriva all the way
Posts: 145
Original Poster
Rep:
|
Quote:
Originally Posted by gilead
I think you have too many dashes - have you tried java -version instead?
|
java -version
bash: java: command not found
|
|
|
05-16-2006, 03:05 PM
|
#4
|
Senior Member
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250
Rep:
|
Looks like you don't have Java installed. If you're sure you do have it installed, it must not be resident on your $PATH.
|
|
|
05-16-2006, 03:06 PM
|
#5
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
Code:
find / -type f -name java 2>/dev/null
|
|
|
05-16-2006, 08:40 PM
|
#6
|
Member
Registered: Sep 2003
Location: Tacoma, WA
Distribution: Mandriva all the way
Posts: 145
Original Poster
Rep:
|
Quote:
Originally Posted by gilead
Code:
find / -type f -name java 2>/dev/null
|
Here is what i got
find / -type f -name java 2>/dev/null
/usr/java/jre1.5.0_06/bin/java
/usr/java/jdk1.5.0_06/bin/java
/usr/java/jdk1.5.0_06/jre/bin/java
ANd
whereis java
java: /etc/java /usr/share/java
|
|
|
05-16-2006, 08:49 PM
|
#7
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
Then I'm guessing that running /usr/java/jdk1.5.0_06/bin/java -version will return something similar to:
Code:
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
Which one you run probably doesn't matter, although I'd expect if you're writing code you'll be interested in the stuff under /usr/java/jdk1.5.0_06. You could add environment variables to your ~/.bash_profile file like these:
Code:
export JAVA_HOME=/usr/java/jdk1.5.0_06
export PATH=$PATH:$JAVA_HOME/bin
Hope that helps...
|
|
|
05-16-2006, 08:59 PM
|
#8
|
Member
Registered: Sep 2003
Location: Tacoma, WA
Distribution: Mandriva all the way
Posts: 145
Original Poster
Rep:
|
Quote:
Originally Posted by gilead
Then I'm guessing that running /usr/java/jdk1.5.0_06/bin/java -version will return something similar to:
Code:
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
Which one you run probably doesn't matter, although I'd expect if you're writing code you'll be interested in the stuff under /usr/java/jdk1.5.0_06. You could add environment variables to your ~/.bash_profile file like these:
Code:
export JAVA_HOME=/usr/java/jdk1.5.0_06
export PATH=$PATH:$JAVA_HOME/bin
Hope that helps...
|
What I am trying to install is FREEMIND, which needs SUN or BLACKDOWN's >=1.4, but it cannot find it an fails to install.
Yes I get this returned
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
|
|
|
05-16-2006, 09:37 PM
|
#9
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
I haven't used FREEMIND, but its docs should tell you which environment variables it needs set. Modifying your path with the following should at least let the install start:
Code:
export PATH=$PATH:/usr/java/jdk1.5.0_06/bin
|
|
|
05-16-2006, 09:49 PM
|
#10
|
Member
Registered: Sep 2003
Location: Tacoma, WA
Distribution: Mandriva all the way
Posts: 145
Original Poster
Rep:
|
ok, so where do I put this information? Me new to that depth of config.
is this in bash_profile?
Last edited by TuxLives; 05-16-2006 at 09:51 PM.
|
|
|
05-16-2006, 09:54 PM
|
#11
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
Yes, if you add it to the .bash_profile file in your home directory, it will be available every time you login. You can type it into a terminal window and it will affect everything you do in that terminal window, it just won't be a permanent change.
|
|
|
05-16-2006, 09:58 PM
|
#12
|
Member
Registered: Sep 2003
Location: Tacoma, WA
Distribution: Mandriva all the way
Posts: 145
Original Poster
Rep:
|
Quote:
Originally Posted by gilead
Yes, if you add it to the .bash_profile file in your home directory, it will be available every time you login. You can type it into a terminal window and it will affect everything you do in that terminal window, it just won't be a permanent change.
|
Hmmm
here is what I have in there now
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
so do I just add these lines, like so?
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
export JAVA_HOME=/usr/java/jdk1.5.0_06
export PATH=$PATH:$JAVA_HOME/bin
It seems like there could be a collision with the $PATH variable
|
|
|
05-16-2006, 10:09 PM
|
#13
|
Member
Registered: Sep 2003
Location: Tacoma, WA
Distribution: Mandriva all the way
Posts: 145
Original Poster
Rep:
|
hey i took what you gave me and what I found on the freemind site and got it working.
Thanks for you help!!!
|
|
|
05-16-2006, 10:46 PM
|
#14
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
Congratulations - I'm glad it's working 
|
|
|
05-16-2006, 10:55 PM
|
#15
|
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
If you have several users on your system, you need to set the JAVA_HOME and its path globally. This can be done by using a script such as the one below, placing it in /etc/profile.d and making it executable.
Code:
#!/bin/sh
export JAVA_HOME=/opt/java
export MANPATH="$MANPATH:/opt/java/man"
export PATH="$PATH:/opt/java/bin:/opt/java/jre/bin"
/opt/java is where my java jdk is installed, so you would have to edit the paths so that they are the same as the ones on your machine.
|
|
|
All times are GMT -5. The time now is 12:29 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|