Linux - Software This 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.
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.
|
 |
|
03-21-2006, 01:00 AM
|
#1
|
LQ Newbie
Registered: Mar 2006
Location: India
Distribution: FC4
Posts: 11
Rep:
|
Linux - Java ?
How do i know where is java installed on my PC ?
java -version is working for me ...
implying that i have installed it somewhere, but i am unable to locate java/bin now
Thanks in advance
|
|
|
03-21-2006, 01:45 AM
|
#2
|
Member
Registered: Aug 2003
Location: Dunedin NZ
Distribution: Mint 13 Cinnamon
Posts: 653
Rep:
|
Try typing this in a console it should print out something like this
Code:
baldrick@blackadder:~> whereis java
java: /usr/bin/java /etc/java /usr/lib/java /usr/include/java /usr/share/java /usr/share/man/man1/java.1.gz
That should give you a starting point.
Baldrick
|
|
|
03-21-2006, 05:54 AM
|
#3
|
LQ Newbie
Registered: Mar 2006
Location: India
Distribution: FC4
Posts: 11
Original Poster
Rep:
|
whereis java
java: /usr/bin/java /etc/java /usr/lib/java /usr/share/java
However i couldnt find a proper java installation ( as in a folder which contained java/bin in any of these mentioned locations)
Anything else that could help me??
java -version
java version "1.4.2"
gij (GNU libgcj) version 4.0.2 20051125 (Red Hat 4.0.2-8)
|
|
|
03-21-2006, 06:14 AM
|
#4
|
Member
Registered: Oct 2003
Location: Holland
Distribution: SuSE 10.0 SuSE 10.2
Posts: 70
Rep:
|
Try looking at /usr/lib/java - it's probably a simlink. Follow the chain of symlinks to the end. There you should find your 'actual' installation complete with bin, include and lib directories.
Of course it may be completely different on your distro.;-)
|
|
|
03-28-2006, 08:22 PM
|
#5
|
LQ Newbie
Registered: Mar 2006
Location: India
Distribution: FC4
Posts: 11
Original Poster
Rep:
|
This is what i found in /usr/lib.
Code:
[linuxbee@localhost ~]$ cd /usr/lib
[linuxbee@localhost lib]$ ls -lrt jav*
java-ext:
total 0
java-1.5.0:
total 0
java-1.4.2:
total 0
java-1.4.1:
total 0
java-1.4.0:
total 0
java:
total 0
Anything else that i should try 
|
|
|
03-29-2006, 01:05 AM
|
#6
|
Senior Member
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,831
|
If you've run updatedb, try One of them has to be it 
|
|
|
03-29-2006, 02:15 AM
|
#7
|
Member
Registered: Jul 2005
Location: USA
Distribution: F10 (x86_64)
Posts: 549
Rep:
|
fedora comes with java-gcj. Mine is in /usr/lib/jvm folder. If you want the sun version, then you have to download it from the sun website.
|
|
|
03-29-2006, 10:19 PM
|
#8
|
LQ Newbie
Registered: Mar 2006
Location: India
Distribution: FC4
Posts: 11
Original Poster
Rep:
|
Quote:
Originally Posted by jlo_sandog
fedora comes with java-gcj. Mine is in /usr/lib/jvm folder.
|
That helped !!!
Now moving on to my main problem... I am trying to install an application on my Linux box, but while trying to do so , the following error msg is displayed
"No Java virtual machine could be found from your PATH
environment variable."
I understand that this is because some Path Variables related to Java have to be set.
Can someone tell me what variables have to be set exactly ?
|
|
|
03-29-2006, 11:10 PM
|
#9
|
Senior Member
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,831
|
basically /usr/lib/jvm/bin/ should be in your PATH:
Code:
PATH="$PATH:/usr/lib/jvm/bin/"
If that works then you add that line to your .bashrc file so it gets set in every shell
|
|
|
03-30-2006, 08:36 PM
|
#10
|
LQ Newbie
Registered: Mar 2006
Location: India
Distribution: FC4
Posts: 11
Original Poster
Rep:
|
Tried this... but i am still getting the same error.
Are there any other java-related environment variables to be set ?
|
|
|
03-30-2006, 11:07 PM
|
#11
|
Member
Registered: Aug 2003
Location: Chennai, India
Distribution: PCLinuxOS .92, FC4
Posts: 840
Rep:
|
What application did you try to install ? Because some apps like Azureus require you to have Sun's Java and wont install with GCJ.
|
|
|
03-30-2006, 11:12 PM
|
#12
|
Senior Member
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,831
|
Are you starting up the installation from GUI? In that case it setting variables in a shell won't affect it. Otherwise I'm not really sure, /usr/lib/jvm/bin/ has all the stuff(java, javac, appletviewer etc)? Maybe it expects a folder named java? or jre?
|
|
|
03-31-2006, 02:17 AM
|
#13
|
Member
Registered: Jul 2005
Location: USA
Distribution: F10 (x86_64)
Posts: 549
Rep:
|
java is already in the path on fedora. However this is java-gcj not java sun and it is very limited. You need java from sun.
|
|
|
03-31-2006, 05:32 AM
|
#14
|
LQ Newbie
Registered: Mar 2006
Location: Zoetermeer, Holland
Distribution: slackware, debian
Posts: 11
Rep:
|
Quote:
Originally Posted by Baldrick65
Try typing this in a console
|
Or (even better, you'll the java actually being used)
|
|
|
04-05-2006, 06:13 AM
|
#15
|
LQ Newbie
Registered: Mar 2006
Location: India
Distribution: FC4
Posts: 11
Original Poster
Rep:
|
Quote:
Originally Posted by jlo_sandog
java is already in the path on fedora. However this is java-gcj not java sun and it is very limited. You need java from sun.
|
Should i uninstall java-gcj before installing sun java? Or to put the question in a better way.... is it ok to unistall java-gcj .. i mean will it affect any other dependencies which come with the other apps that come along with FC ?
|
|
|
All times are GMT -5. The time now is 11:38 AM.
|
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
|
|