LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 02-17-2008, 07:10 AM   #1
skeggysteve
LQ Newbie
 
Registered: Aug 2005
Posts: 6

Rep: Reputation: 0
Java install - small, silly problem - I think!


Hi,

I'm trying to install Java but as a complete numty I can get passed the first step.

Went to Java.com
Downloaded - Linux RPM (self extracting file) to my desktop

Instructions on Java.com the tell me to open a terminal and log in with su -

Then:

"Change to the directory in which you want to install. Type:
cd <directory path name>
For example, to install the software in the /usr/java/ directory, Type:
cd /usr/java/"


That where I'm stuck I just get back a message telling me there is no such dir.

I have tried to cd to a dir I made in home/me but still get the same error (no such dir)

Sorry if this is a silly question but my teenage son who usually sorts me out is not available (as in "Oh sort it out yourself it's simple" !) I have done a search on here but can't find any thing.

If you have not fallen of your chair laughing at my stupidity, I would be very gratefully if you could please answer in very simple terms.

Thank you in advance,
Steve

Gentoo, KDE desktop and Firefox 2
 
Old 02-17-2008, 07:33 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Probably, just as the message says, there is no /usr/java. Make it yourself with "sudo mkdir /usr/java". Then you can cd to it.
 
Old 02-17-2008, 08:59 AM   #3
skeggysteve
LQ Newbie
 
Registered: Aug 2005
Posts: 6

Original Poster
Rep: Reputation: 0
You are right the dir usr/java does not exist.

Trying your suggestion and I get:

-su: sudo: command not found

I have tried to make the dir myself in KDE's file manager but get this:

Access denied to /usr/java
 
Old 02-17-2008, 11:26 AM   #4
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
I guess you don't have installed sudo,so you maybe want to install it.If you can login as root then you can fix this problem with mkdir /usr/java,but you can do it as a normal user by just installing java in your home directory: mkdir /home/you/java but then your java wan't have system wide affect.I would like to know why are you wan't to install java, then I could help you maybe even more.

Last edited by alan_ri; 02-18-2008 at 04:01 PM.
 
Old 02-17-2008, 12:00 PM   #5
skeggysteve
LQ Newbie
 
Registered: Aug 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Alan,

I 'thought' I had had logged in as root using the su - command in a terminal.

Anyway I did as you suggested:

mkdir /home/you/java

Worked fine - I moved the Java rpm file from my desktop to this newly made dir and followed the instructions at Java.com

www.java.com/en/download/help/5000010500.xml#rpm

Changed the file permissions, then did:

./jre-6u3-linux-i586.bin

But there is no such file, thats because the file is named:

./jre-6u3-linux-i586-rpm.bin

So I altered the command to:

./jre-6u3-linux-i586-rpm.bin

It then took me though pages of licence agreements, I typed yes and got this:

Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
inflating: jre-6u3-linux-i586.rpm
./jre-6u3-linux-i586-rpm.bin: line 396: rpm: command not found


It has put a file in the java dir called 'jre-6u3-linux-i586.rpm'

Why do I want Java installed?
Well, I have found a games site - www.pogo.co.uk - and if you want to play a game a pop up window opens and it says "additional plugins are required to display all the media on this page".
I go to install and it tells me I must do a manual install and so to the reason for me asking for help!
 
Old 02-17-2008, 12:14 PM   #6
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
I'm short with time now,very soon will logout from LQ,so here's a quick reply:if you are using Gentoo then rpm packages want work for you,on java site use Linux self extracting binary file,then you'll be ok,if you can have root access then install in /usr/local and /home/you/java should be /home/the_name_of_the_current_user/java,I guess it's your sons name.Check this by whoami command in terminal.

Last edited by alan_ri; 02-17-2008 at 12:18 PM.
 
Old 02-17-2008, 12:17 PM   #7
skeggysteve
LQ Newbie
 
Registered: Aug 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks for all your help Alan, I'll give what you suggest a go.
 
Old 02-17-2008, 02:56 PM   #8
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Just an FYI, I didn't know you had logged in as root. If you enter "su -", you will become root as well. You need to be the root user to be able to install files to system directories. It prevents a bad program (or a typo in the shell) running as a normal user from modifying your system. This is a security measure designed from the start. If you also use XP or NT, that is how you should configure windows as well, but due to its lineage that breaks a lot of software. ( Which is a complaint using Vista. )
 
Old 02-18-2008, 01:22 PM   #9
skeggysteve
LQ Newbie
 
Registered: Aug 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Update!

I downloaded the .bin file and followed the instructions on Java.com.

Worked fine. Extracted the files and made a new dir etc

Then I did the "Enable and Configure" part.

But I still have no Java on my Firefox and I couldn't watch the leader board for yesterdays Daytona 500.

Firefox is installed in /home/myname/firefox

Jave is installed in /home/myname/java

So I'm guessing the problem is that they are not installed in the 'system' folder/partition.

As Jsc said, I thought that, however I logged onto the computer, I should have root privileges by opening a terminal and using the 'su -' command, but I'm not sure that this is the case in this instant.
 
Old 02-18-2008, 03:24 PM   #10
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Sometimes if java is not installed in /usr/local with root access this could be a problem,but you maybe need java runtime environment which is not the same package as the one you downloaded.You could maybe find it in your system repos,or you could download it from the web.Check this page http://www.sun.com/download/index.jsp and this one maybe have what you need http://java.sun.com/javase/downloads/index_jdk5.jsp .
Anyway I think they made it complicated.Try download and install jre on the page I suggested.When you try to login as root,you type su,but do you then type your passwd press enter and get this sign # ? cause I don't know how familiar you are with Linux.

Last edited by alan_ri; 02-18-2008 at 03:54 PM. Reason: forgot something
 
Old 02-18-2008, 03:43 PM   #11
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
1. download jre or jdk package from Sun (rpm.bin for Red Hat based distros, bin for other ones)
2. make it executable using chmod +x ./jre...bin
3. run: ./jdk... or ./jre...
4.the rpm.bin will create rpm files that you install with rpm -ivh *rpm, the bin package creates a java folder that you should move manually to wherever you like
5. put this in /etc/profile for system-wide configuration or in .bash_profile for the current user only:
export JAVA_HOME=/path/to/java directory
export J2RE_HOME=/path/to/java directory/jre
run source /etc/profile (as root) or source .bash_profile (or log out)
check with echo $JAVA_HOME and java -version
6. You may still need to link the java plug-in:
ln -s /path/to/jre directory/plugin/i386/ns7/libjavaplugin-oji.so /usr/lib/firefox/plugins/libjavaplugin-oji.so
 
Old 02-20-2008, 11:48 AM   #12
skeggysteve
LQ Newbie
 
Registered: Aug 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Just to a quick post to say thanks to everyone for the help. I'll have another go at the weekend and fingers crossed I'll be able to sort it out.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Rewriting small method (Java) megabot Programming 11 02-13-2007 11:51 PM
java for damn small linux Clarence27 Linux - Newbie 2 07-26-2006 10:38 AM
small Java IDE linuxmandrake Linux - Software 1 03-27-2006 10:31 AM
Fonts in Java too small Swords SUSE / openSUSE 0 02-13-2005 07:31 PM
Silly Newbie software install problem with GTK2 Jadasin Linux - Newbie 1 08-08-2004 11:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:02 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
Open Source Consulting | Domain Registration