March 19, 2024, 04:19:21 AM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: Installing & configuring JAVA / How to / tutorial  (Read 19825 times)

Offline yobbo

  • New Member
  • Posts: 3
Installing & configuring JAVA / How to / tutorial
« 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:
Code: [Select]
su
password

Create the /usr/java directory
Code: [Select]
mkdir /usr/java
Copy the java package to /usr/java
Code: [Select]
cp filename.bin /usr/java
Extract/Install the package to /usr/java
then type following
Code: [Select]
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
Code: [Select]
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
Code: [Select]
nano -w /etc/profile
pico /etc/profile
vi /etc/profile
mcedit /etc/profile
Add
Code: [Select]
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

Code: [Select]
nano -w /etc/ld.so.conf
pico /etc/ld.so.conf
vi /etc/ld.so.conf
mcedit /etc/ld.so.conf
Add
Code: [Select]
/usr/java/j2re1.4.2_04/lib
Run /sbin/ldconfig


Have a lot of fun
As the SuSE team say

Offline keen_prat

  • Linux Noob !
  • *
  • Posts: 21
Installing & configuring JAVA / How to / tutorial
« Reply #1 on: March 30, 2004, 03:24:13 PM »
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  ?

Offline yobbo

  • New Member
  • Posts: 3
Installing & configuring JAVA / How to / tutorial
« Reply #2 on: April 01, 2004, 11:59:27 PM »
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  ?

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

Offline jck

  • New Member
  • Posts: 1
Installing & configuring JAVA / How to / tutorial
« Reply #3 on: April 07, 2004, 03:36:09 AM »
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?

Offline yobbo

  • New Member
  • Posts: 3
jck's query
« Reply #4 on: April 14, 2004, 04:48:42 PM »
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

Offline e_zoo_din

  • New Member
  • Posts: 1
Installing & configuring JAVA / How to / tutorial
« Reply #5 on: May 03, 2004, 05:28:29 AM »
-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 :(

Offline xhunter

  • New Member
  • Posts: 3
Installing & configuring JAVA / How to / tutorial
« Reply #6 on: May 20, 2004, 09:58:51 AM »
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:

Offline mpower

  • New Member
  • Posts: 2
Installing & configuring JAVA / How to / tutorial
« Reply #7 on: June 23, 2004, 06:39:26 AM »
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

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
Installing & configuring JAVA / How to / tutorial
« Reply #8 on: June 24, 2004, 04:47:03 AM »
linux server !!
Hmm.. I think you have got javascipt disabled in your browser . Check it ;)

Offline mpower

  • New Member
  • Posts: 2
Installing & configuring JAVA / How to / tutorial
« Reply #9 on: June 24, 2004, 04:50:39 AM »
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.

Offline edixon

  • New Member
  • Posts: 1
Installing & configuring JAVA / How to / tutorial
« Reply #10 on: August 18, 2004, 07:08:27 PM »
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.