Linux - NewbieThis 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
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.
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.
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.
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.
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.
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. )
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.
Last edited by alan_ri; 02-18-2008 at 03:54 PM.
Reason: forgot something
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.