Linux in General > Linux Tutorials & How To's

Installing & configuring JAVA / How to / tutorial

(1/3) > >>

yobbo:
Installing Java for Mozilla

First download the java package from java website.. ie java.sun.com
Now Login as root by:

--- Code: ---su
password
--- End code ---

Create the /usr/java directory

--- Code: ---mkdir /usr/java
--- End code ---

Copy the java package to /usr/java

--- Code: ---cp filename.bin /usr/java
--- End code ---

Extract/Install the package to /usr/java
then type following

--- Code: ---sh packagename.bin
--- End code ---

Now it will show agreement..
Scroll through the license agreement
(space)

Accept the agreement
yes

Congratulations, Java is installed
------------------------------------------------------------------------------------------------------------------------------------------------------------
Now we need to create a symbolic link from the java plugin to the plugins directory of mozilla

Note that for example I use the j2re-1_4_2_04-linux-1586.bin package

Type

--- Code: ---ln -s /usr/java/j2re1.4.2_04/plugin/i386/ns610-gcc32/libjavaplugin_oji.so /usr/lib/mozilla-1.4/plugins/libjavaplugin_oji.so
--- End code ---

Note that there is a space between oji.so and /usr/lib

Note that any different paths due to different versions of java or mozilla need to reflected for the symbolic link
------------------------------------------------------------------------------------------------------------------------------------------------------------

Installing Java Globally

--- Code: ---nano -w /etc/profile
pico /etc/profile
vi /etc/profile
mcedit /etc/profile

--- End code ---
Add

--- Code: ---JAVADIR=/usr/java/j2re1.4.2_04
PATH=$JAVADIR/bin:$PATH
MANPATH=$JAVADIR/man:#MANPATH
LD_LIBRARY_PATH=$JAVADIR/lib:$LD_LIBRARY_PATH
export PATH MANPATH LD_LIBRARY_PATH

--- End code ---
Note that if there is an existing export line, just add the above to it


--- Code: ---nano -w /etc/ld.so.conf
pico /etc/ld.so.conf
vi /etc/ld.so.conf
mcedit /etc/ld.so.conf

--- End code ---
Add

--- Code: ---/usr/java/j2re1.4.2_04/lib

--- End code ---
Run /sbin/ldconfig


Have a lot of fun
As the SuSE team say

keen_prat:
Mr. Yobbo can you give the exact location (download location) from where i can get the Java. btw what is j2se and java sdk.. wht are we going to use here  ?

yobbo:

--- Quote from: "keen_prat" ---Mr. Yobbo can you give the exact location (download location) from where i can get the Java. btw what is j2se and java sdk.. wht are we going to use here  ?
--- End quote ---

Yes

http://www.sun.com/en/download/manual.jsp

There is an rpm version available too, but I dont recommend it
j2re is the pefix for runtime environment
sdk is the prefix for development kit

I believe sdk is used for those wanting to write programs

jck:
Hello! I tryed to instal java onto my machine but I keep getting the error "No such file or directory"  What am I doing wrong?? I'm putting in cp jr2e-1_4_2_04-linux-i586.bin /usr/java but it doesn't work.  Also, I had to uninstall Mozilla because I have the dissapearing menu items whenever I install any packages.  Will this work  (if I ever get it right) for Konqueror?

yobbo:
jck

Did you forget the mkdir /usr/java step before the cp step?
If you did you will get that error
Your disappearing menu items problem has nothing to do with Mozilla
I just know you are using Mandrake 9.2 because it has that bug
You must get the updates, especially the rpm ones. The disappearing menu's is because the rpm database is not created correctly, and the updated rpm packages will fix it for you. The new rpm packages are under "bugfix" in the updates. lists. To recover your missing menu item, do this
From the menu
Configure
Configure my computer
Menu (or similar)
Select either Menu type
Environments
All Environments
Then save

This will bring back your mising menu items and because you have updated the rpm packages all will be ok

Have Fun
yobbo

PS Install Mozilla again

Navigation

[0] Message Index

[#] Next page

Go to full version