Gnutella Forums  

Go Back   Gnutella Forums > Current Gnutella Client Forums > LimeWire+WireShare (Cross-platform) > Technical Support > General Linux Support
Register FAQ The Twelve Commandments Members List Calendar Arcade Find the Best VPN Today's Posts

General Linux Support For questions regarding use of LimeWire or WireShare or related questions on the Linux operating system. This includes installation questions and answers. (Check the Stickies marked in Red at top of this section.)


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old January 13th, 2003
Disciple
 
Join Date: January 13th, 2003
Posts: 10
b4k4^ni is flying high
Thumbs up Installing Java

Installing Java on Linux seems to be a bit of a problem for newbies. Here are a few pointers that hopefully will make the installation a sucess.

Before you do anything, read this whole post and make sure you understand it.

First of all make sure you have a recent version of Linux as recomended by Sun.

Read the installation guide and don't skip steps even if they seem useless.

http://java.sun.com/j2se/1.4.1/jre/install-linux.html

Download the latest version of Java from Sun. You have two choices rpm and bin either one works as long as you follow the exact directions in the installation guide. Here is the java download page:

http://java.sun.com/j2se/1.4.1/download.html

There are a couple of gotchas here. The bin installation is not too clear on the root access. For that reason alone newbies should use the rpm installation.

When you do the rpm installation you first get a file with extension rpm.bin. This is a self extracting file that displays a license ageement and it prompts you to agree (type yes to the prompt) or not (type no). Before you self extract this file you must give it execute permission (chmod) as indicated in the first command of step 2 of the the installation guide. If you you fail to do so, you will not be able to execute the script. Do not attempt any shortcuts here or you may run into problems.

Yes, the current directory ( ./ ) in front of a command is important in Linux so you do need it in the second command of step 2. Unlike WIndows, the current directory in Linux is not in the PATH so executables will not be found if ./ is not specified.

After this step a file with extension rpm is created (if you ageed to the license).

Step 3 indicates to loggin as root. You do this with the "su" command.

Step 5 is done with the command "exit "


I just can't say it enough: Follow the exact instructions in the guide.

After you have succesfully installed Java, you need to make it accesible by modiying the PATH variable to include the java directory in the path. There a several way to do this. I prefer to make it a system wide change so I modify /etc/profile to have a line like this

PATH=<javadirectory>:$PATH

where <javadirectory> is where java executable got installed. The directory will be different according to the version you installed. To find out do this command:

find /usr/ -name "*j2*"

The find command will help you determine the directory that containts the Java installation. What you need is the subdirectory that contains the java executable. This subdirectory is "bin".

Example:

You found out that Java is in

/usr/java/j2re-1.4.0_02

The java executable is in directory

/usr/java/j2re-1.4.0_02/bin

Thus you should change your profile to have this line:

PATH=/usr/java/j2re-1.4.0_02/bin:$PATH

Some Java applications look for a variable called JAVA_HOME. You might as well set this variable in the profile and combine it with the PATH change.

Here is a way to setting up both the PATH and JAVA_HOME in our example where we assumed Java in /usr/java/j2re-1.4.0_02:

Add these lines to the profile:

JAVA_HOME=/usr/java/j2re-1.4.0_02
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME


IMPORTANT
Before you mess around editing /etc/profile make a copy of it. This way you could restore from the copy if necessary.

To make a backup copy do

cp /etc/profile /etc/profile.save


Windows users note that the different paths in the $PATH variable are separated by a colon ( : ) unlike Windows. Also environment variable in Linux are referenced with a $ sign.

Finally make sure you do your PATH and JAVA_HOME before the corresponding "export" commands in /etc/profile

Once you do this change you must login as a user to see if the change and do

echo $PATH
echo $JAVA_HOME

to verify that you have the right PATH and JAVA_HOME.

If you do you will be able to do

which java

and get the directory that has java. If you get an error review your settings and try it again.

Finally this command will tell you for sure if java is installed:

java -version

This should display the version of your java if not then review the steps and fix the problem.


Good luck.

Last edited by b4k4^ni; June 7th, 2003 at 05:45 AM.
Reply With Quote
  #2 (permalink)  
Old April 8th, 2003
CelestiaLegends
Guest
 
Posts: n/a
Unhappy Big Problem

I followed the instructions...

When linux starts up and loads X-server, I type in my login and KDE trys to start, but it gets an error and logs back out. (for ALL users, even root). I try to log in on terminal, when I get in I can only run the cd command, all other commands I know (find, ls, cat, joe, vi, su, etc) aren't recognised.

I think that screwed something up, because it's the only thing I changed...I can run all commands in rescue mode, but when I try to edit the profile file, it looks like it's unedited from before (no java path)...whats going on here?
Reply With Quote
  #3 (permalink)  
Old April 8th, 2003
Distinguished Member
 
Join Date: September 21st, 2002
Location: Aachen
Posts: 733
trap_jaw is flying high
Default

I don't know. What program did you use to edit the .profile file?
__________________
Morgens ess ich Cornflakes und abends ess ich Brot
Und wenn ich lang genug gelebt hab, dann sterb ich und bin tot

--Fischmob
Reply With Quote
  #4 (permalink)  
Old April 8th, 2003
Disciple
 
Join Date: January 13th, 2003
Posts: 10
b4k4^ni is flying high
Default

Sounds like you might have wiped the contents of the PATH variable. That's why you don't see the commands.

Login as root from a text console (ALT+F2) and do this command:

echo $PATH

You should have at least these directories in the path:

/bin:/usr/bin:/usr/X11R6/bin

You need to edit /etc/profile and fix the assignment to the PATH variable. Make sure you use colon ( : ) as a separator. It is a common mistake for windows users to use simicolon instead.

You can still invoke the commands by specifying the full path.

Hopefully you know how to use the vi editor. If you do then just do

/bin/vi /etc/profile

fix the profile.

Optimally your PATH should contain other directories including the direcotry for Java binaries.

Before you edit any files it is a good practice to make a copy of the file just in case you need to restore it.
Reply With Quote
  #5 (permalink)  
Old April 8th, 2003
CelestiaLegends
Guest
 
Posts: n/a
Default Tahnk you!

Thank god and thank you! I thought I'd have to reinstall linux again!

Everything works again like before...however java VM still is not reconized...
Reply With Quote
  #6 (permalink)  
Old April 9th, 2003
Disciple
 
Join Date: January 13th, 2003
Posts: 10
b4k4^ni is flying high
Default

If you need help you need to provide more information.

What exactly do you mean with "java VM not recognized" ?

Which directory did you install java in?

find out with

find / -name "*j2*"

What is the PATH set to?

find out with

echo $PATH

PS: It's good to hear you are up and running again.

Last edited by b4k4^ni; June 7th, 2003 at 05:43 AM.
Reply With Quote
  #7 (permalink)  
Old April 10th, 2003
CelestiaLegends
Guest
 
Posts: n/a
Default

when I try to run runLimeWire it still says I need to have java VM installed...

my java dir. is /usr/java/j2re1.4.1_02

my PATH variable is

/usr/java/j2re1.4.1_02:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/opt/kde2/bin:.:/usr/lib/java/bin:/opt/gnome/bin

PS: thanks ^_^
Reply With Quote
  #8 (permalink)  
Old April 10th, 2003
Disciple
 
Join Date: January 13th, 2003
Posts: 10
b4k4^ni is flying high
Default

CelestialLegends, you just mihgt have helped unlock one of the mysteries of tha java VM installation.

Here is the scoop:

Your Java installation directory is

/usr/java/j2re1.4.1_02


However the java executable is in a subdirectory called "bin" in otherwords

/usr/java/j2re1.4.1_02/bin

so your PATH should be

/usr/java/j2re1.4.1_02/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/opt/kde2/bin:.:/usr/lib/java/bin:/opt/gnome/bin

Do the change then logout and login again for the profile to take effect. Check your PATH and do

which java

Should give you

/usr/java/j2re1.4.1_02/bin/java

Find out the version with:

java -version

You should be OK.

Last edited by b4k4^ni; June 7th, 2003 at 05:42 AM.
Reply With Quote
  #9 (permalink)  
Old May 11th, 2003
Super new
Guest
 
Posts: n/a
Default

Well, I tried editing this profile thru vi and I edit my path for java ok but how do I save those changes?
Reply With Quote
  #10 (permalink)  
Old May 12th, 2003
Disciple
 
Join Date: January 13th, 2003
Posts: 10
b4k4^ni is flying high
Default

To exit vi and save the changes do:

[ESC]
:
wq!
[ENTER]


Where [ESC] is the escape key and [ENTER] is the enter key.
Reply With Quote
Reply


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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
i need help; LW says please install the new version of java after installing Java Logan_2468 Windows 7 October 6th, 2009 12:07 AM
Installing Java humbertoarte Windows 5 October 11th, 2006 10:25 AM
Installing Java m-life Windows 2 March 5th, 2006 01:32 PM
Installing Java chunkin General Linux Support 1 September 8th, 2003 01:29 PM
Installing java Unregistered General Linux Support 1 March 3rd, 2002 05:29 AM


All times are GMT -7. The time now is 03:37 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.

Copyright © 2020 Gnutella Forums.
All Rights Reserved.