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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
ok here is what happened. I went to install LimeWire. well i needed Java. i downloaded jre1.3.1 and installed it. i did everything and i kept getting errors. so i decided to upgrade to 1.4.1 and downloaded j2re1.4.1 well i went to uninstall 1.3.1 and it said it wasn't installed. so i gave up and installed 1.4.1 and i changed my java.sh. problem is that now there is both jre1.3.1 and j2re1.4.1 directories on my system and my "java -version" gives me this:
[root@localhost steve]# java -version
java version "1.3.1"
jdkgcj 0.2.3 (URL HERE BUT I CANT POST IT CUZ IM A n00b)
gcj (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
i have tried doing everything i can to yank 1.3.1 and add 1.4.1 including forced upgradedes and the whole nine yards. Im running RH9 with 2.4.20-8 kernel. any ideas what i can do?
Download the official J2SDK (J2SE) for Linux from java.sun.com. The current version is 1.4.2_02. There are instructions for installing it on the Javasoft website and Java installation questions are posted in these forums daily. Use the search function here and you will find a lot of useful posts.
i've tried them all and my problem is when that it once i install it, it says its not there, and i cant write over the 1.3.1 files and i cant yank the 1.3.1 i've tried rpm -e rpm --force (install and upgrade) all combos just dont work. is there some way to manually delete all the files and yank it like you can to some things in windows?
What distro are you running? Some distro's have a utility that lets you run more than one Java VM at once (for example, java-config on Gentoo). It is possible that you need to configure such a program to recognize your jre before you can use the jre.
Also, while Sun's JRE is probably the fastest out there for Linux, some apps - such as OpenOffice, prefer Blackdown - an open source alternative.
im running RedHat version 9 and i have a pretty slow system so faster is better lol but if u have any suggestions plz say so. i think what happened is that the 1.3.1 install got whacked because 1.3.1 never worked. it cant find the compiler and interpiter and 1.4.1 cant either, even when i change the java.sh and reenter everything in terminal. im sorta a noob at this stuff and im wondering if their are alternatives to having to reload the entire system because that would b a MAJOR pain. thx all
Apt is the "open source" version of RedHat's update daemon. Rather than downloading RedHat's rpm's from RedHat's ftp servers, users can download the same rpm's from faster repositories like freshmeat and rpmfind. Apt repositories don't require you to pay money or get on some annoying mailing list. They also contain tested, stable rpm's that other users have uploaded (just be sure that you use legitimate repositories). Apt will solve dependencies for you and allow you to automatically download and install any rpm's that go with the rpm you needed. Apt will also search repositories for you and tell you what packages need updating.
Apt has a command-line interface (apt-get) and a gui (synaptic) both of which I found easy to use. Just download apt-get from a site like rpmfind.net, run "apt-get synaptic", fire up synaptic, and you're in business!
To go back to your earlier question, yes; apt is used by Debian, Connectiva, Mandrake, and numerous other distro's for that matter. There is apt out there specifically for RedHat, and if there is an rpm out there for Java VM, it's probably on apt.
Distribution: RedHat (RHEL, FC, CentOS), openSuSE, Mac OS X
- get the selfextracting bin file from java.sun.com
- extract it
- copy the subdirectory you got after extraction to /usr/ (probably resulting in /usr/j2sdk1.4.2/ )
- symlink (ln -s) java javac from /usr/j2sdk1.4.2/bin/ to /usr/bin/
ie cd /usr/j2sdk1.4.2/bin
ln -s java /usr/bin
ln -s javac /usr/bin
(the first is java so you can run java applications, the second is a java compiler, you might not need it ... there are other tools there, add them if you need them)
- type java -version to check you are getting the right thing, something like:
root@stormcrow:/home/chakkerz# java -version
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
IF you get an error regarding a library not being found, the lib file is in /usr/j2sdk1.4.2/jre/lib/i386
- either ldconfig from there, or
- copy it to /usr/lib/ whatever makes you happiest.
either way you will need to run ldconfig - a handy option might be to do it this way:
ldconfig --verbose | grep libjava
may be a good idea, cause it lets you know that the lib was added (if it was):
root@stormcrow:/usr/lib# ldconfig --verbose | grep libjava
libjava.so -> libjava.so
you might see stuff similar to this:
ldconfig: Can't stat /usr/i386-slackware-linux/lib: No such file or directory
ldconfig: Can't stat /usr/j2sdk1.4.1_03/jre/lib/i386: No such file or directory
which might be a carry over from your previous attempts, don't let it phase you too much.
PS.: you need to be root to add things to /usr on most systems, you need to be root to add things /usr/bin and /usr/lib, you need to be root to run ldconfig, so consider doing this as ... (you guessed it) root.
Distribution: RedHat (RHEL, FC, CentOS), openSuSE, Mac OS X
hmm interesting. try deleting the java link in /usr/bin/ and redoing it.
Another thing to check, while you're at it, is go into /usr/java/j2re1.4.1_05/bin and run ./java -version and see if that works. Another thing you might want to do (i've just checked mine) is that if the symbolic link doesn't work, instead of ln -s use a straight cp and copy it to /usr/bin ... it shouldn't make any difference, but it might be worth a shot. I've actually got copies here at the moment, though i've used symlinks in the past i'm sure.
Oh one last thing. Check that /usr/java is not actually a symlink. just go into /usr/java and see if there actually is a subdirectory in there for JRE. I've had that throw me in the early days. I (think, i) tried symlinking through a symlink and it didn't look upon it too favourably.
ok i tried ur thing and doing some nasty work i ended up deleting 1.3.1 and upgrading to 1.4.1 i had to remove the orignial java symlink and do this: ln -f -s /usr/java/j2re1.4.1_05 /usr/bin thx for all the help. i now have java working and im onto my next problem of getting limewire to use a proxy but thats a subject for another post lol