Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
Linux in General => Linux Tutorials & How To's => Topic started by: yobbo on March 30, 2004, 12:10:54 AM
-
Installing Java for Mozilla
First download the java package from java website.. ie java.sun.com
Now Login as root by:
su
password
Create the /usr/java directory
mkdir /usr/java
Copy the java package to /usr/java
cp filename.bin /usr/java
Extract/Install the package to /usr/java
then type following
sh packagename.bin
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
ln -s /usr/java/j2re1.4.2_04/plugin/i386/ns610-gcc32/libjavaplugin_oji.so /usr/lib/mozilla-1.4/plugins/libjavaplugin_oji.so
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
nano -w /etc/profile
pico /etc/profile
vi /etc/profile
mcedit /etc/profile
Add
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
Note that if there is an existing export line, just add the above to it
nano -w /etc/ld.so.conf
pico /etc/ld.so.conf
vi /etc/ld.so.conf
mcedit /etc/ld.so.conf
Add
/usr/java/j2re1.4.2_04/lib
Run /sbin/ldconfig
Have a lot of fun
As the SuSE team say
-
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 ?
-
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 ?
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
-
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?
-
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
-
-i've succesfully installed java but a bit blur about configure it....
-this is what i did....
1) added at /etc/profile (vi /etc/profile)
#before
if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
INPUTRC=/etc/inputrc
fi
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC
for i in /etc/profile.d/*.sh ; do
if [ -r $i ]; then
. $i
fi
done
unset i
#after adding
if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
INPUTRC=/etc/inputrc
fi
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
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC
for i in /etc/profile.d/*.sh ; do
if [ -r $i ]; then
. $i
fi
done
unset i
2) added at /etc/ld.so.conf (vi /etc/ld.so.conf)
#before
[root@nbwsmy1 etc]# more ld.so.conf
/usr/local/lib
/usr/kerberos/lib
/usr/X11R6/lib
/usr/lib/mysql
/usr/lib/qt-2.3.1/lib
[root@nbwsmy1 etc]#
#after
[root@nbwsmy1 etc]# more ld.so.conf
/usr/local/lib
/usr/kerberos/lib
/usr/X11R6/lib
/usr/lib/mysql
/usr/lib/qt-2.3.1/lib
/usr/java/j2re1.4.2_04/lib
[root@nbwsmy1 etc]#
3) Run /sbin/ldconfig
[root@nbwsmy1 etc]# /sbin/ldconfig <enter>
[root@nbwsmy1 etc]#i
4)restart the pc
im truly a beginner in linux :(
-
for me i installed java by this manner
i download it from java site as bin file
then
in the terminal i wrote
bash jr2e-1_4_2_04-linux-i586.bin
the alot of things displayed such as agreement and so on
and then it will unpack the file to /usr/java
u will find it there
and thats all
but i wanna know how to run applets cuz its disabled??????
:wink:
-
Hi, i just came from LQ via a users link. I i'm curious as to know why my java scripts dont work on my linux server. Do i need this installed on my box to allow processing of java scripts? Thankx
-
linux server !!
Hmm.. I think you have got javascipt disabled in your browser . Check it ;)
-
Hmmm can't be. It seems i've order mulitple things on the net that was java based (forms or what not). On my server id doesnt' work for some odd reason.
-
mpower, there may be an issue w/ terminology here. Java and JavaScript have nothing to do with each other. One is a Sun-controlled compiled language, one is a script used for client-side web scripting.
If javascript isnt working it is w/o a doubt your client machiene's browser. If java isnt working, it is probably your java install.
The server dosnt actually process the java, unless it is a servlet/jsp/cfm page.
Doh: realized its an old post after i submitted, sorry for the resurection.