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 |
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.
|
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 |
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.
|
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! |
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.
|
Thanks for all your help Alan, I'll give what you suggest a go.
|
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. )
|
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. |
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. |
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 |
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.
|
All times are GMT -5. The time now is 12:47 AM. |