LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Java installation problem (https://www.linuxquestions.org/questions/linux-software-2/java-installation-problem-573565/)

rjvcrisen0 07-30-2007 11:37 PM

Java installation problem
 
Okay, its safe to say that i'm gonna hate computers all together. Okay, I'm trying to download Java Runtime Environment( * Platform(s):
Red Hat Linux, SUSE Linux, JDS
* Browser(s):
Netscape 6.2x, Netscape 7, Mozilla 1.4+
* JRE version(s):
1.5.0

And every time I try to open it it always says this= Could not open the file /home/gateway/Desktop/jre-6u2-linux-i586.bin.

gedit has not been able to detect the character coding.
Please check that you are not trying to open a binary file.
Select a character coding from the menu and try again.

And I try to all of the codings i havebut none of them work. Please Help me. I don't know anything about Computers or linux. Please.

jlliagre 07-30-2007 11:48 PM

This file is a binary program, not something you open with a text editor.

Open a terminal window and run these commands:
Code:

cd /home/gateway/Desktop
chmod +x jre-6u2-linux-i586.bin
./jre-6u2-linux-i586.bin


shadowsnipes 08-01-2007 09:11 AM

Before you do that either check the md5sum or at least the file size to make sure you actually downloaded the correct file. I've seen problems with downloads from Sun's website before where the full file was not downloaded for some reason.

When you run that file (after giving it run permissions as shown in the previous post) it should ask you to agree to their licensing blah blah and then it unzips itself. From there you can run Java by simply running the java binary under the bin directory in the unzipped java folder.

If you want to install it globally have root move that folder to somewhere such as usr/lib. You will probably want to create a symlink at /usr/lib/java that points to that folder. In addition, you set set the env var JAVA_HOME=/usr/lib/java and add /usr/lib/java/man to your MANPATH if desired. The java bin directory should also be added to your PATH or a java symlink pointed to the java bin directory can be put somewhere that falls under your PATH (such as /usr/local/bin).

Plugins:
all you need to do is make a symlink in your browser plugins directory that points to the appropriate java plugin (/usr/lib/jre1.5.0_12/plugin/i386/ns7/libjavaplugin_oji.so for instance). If you don't want to install the plugins globally then use the browser plugins directory in your browser folder under your home directory (it will be something like .mozilla/firefox/plugins).

If you don't know how to make symbolic links run
Code:

man ln
and read what it says. Try man command_name for any command you don't understand (command_name --help also can be helpful).

You can google for a good primer on Linux to help get you up to speed. One I like, though it has some distro-specific stuff in it, is the Slack book found at http://www.slackbook.org/. If you read that you will feel much more confident in managing your system.

jay73 08-01-2007 09:22 AM

Suse should be a lot easier than the other two because the jre can be installed from its repositories. Just go into Software Management under YAst, click and apply.

jlliagre 08-01-2007 09:31 AM

Quote:

Originally Posted by shadowsnipes
Before you do that either check the md5sum or at least the file size to make sure you actually downloaded the correct file. I've seen problems with downloads from Sun's website before where the full file was not downloaded for some reason.

Not strictly necessary in that case.
The java installer first check the file integrity before going on.

shadowsnipes 08-01-2007 09:49 AM

Quote:

Originally Posted by jlliagre
Not strictly necessary in that case.
The java installer first check the file integrity before going on.

True, the only reasoned I mentioned it is because I've seen people try to execute a java install bin file that is no more than a placeholder for the real download (which failed) and they sit there and wonder why nothing useful happens. Checking the file size is just a quick and simple test.

Quote:

Originally Posted by jay73
Suse should be a lot easier than the other two because the jre can be installed from its repositories. Just go into Software Management under YAst, click and apply.

It is true that installing a package would be the easiest route as a good package should do all the linking and such that I mentioned in my previous post. You should become very familiar with your distro's package manager. Most linux distros have them.

What distro are you using?


All times are GMT -5. The time now is 01:41 PM.