java on redhat 9

how to install and run java on redhat 9
jamesccnacmpAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

kasper2003Commented:
if you want to run java applet on web pages/java programs read this.
http://java.com/en/download/help/linux_install.xml

if you want to develop java software read this
http://java.sun.com/learning/new2java/index.html

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jamesccnacmpAuthor Commented:
shockwave is the program I need to in install so I can see the web page.  
0
kasper2003Commented:
there is not shackwave palyer for linux at this moment. they are currently windows and mac only.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

wesly_chenCommented:
Flash Player 7 for Mozilla 1.2
http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&P2_Platform=Linux&P3_Browser_Version=Netscape4

download j2re-1_4_2_04-linux-i586.bin from
http://java.com/en/download/linux_manual.jsp
Then as root,
chmod a+x  j2re-1_4_2_04-linux-i586.bin
./j2re-1_4_2_04-linux-i586.bin
0
jamesccnacmpAuthor Commented:
this is not working this the output

[root@c-67-162-251-189 james]# chmod a+x  j2re-1_4_2_04-linux-i586.bin
chmod: failed to get attributes of `j2re-1_4_2_04-linux-i586.bin': No such file
or directory
[root@c-67-162-251-189 james]# ./j2re-1_4_2_04-linux-i586.bin
bash: ./j2re-1_4_2_04-linux-i586.bin: No such file or directory
[root@c-67-162-251-189 james]#
[root@c-67-162-251-189 james]#
0
wesly_chenCommented:
where did you put the j2re-1_4_2_04-linux-i586.bin?
please do
[root@c-67-162-251-189 james]#  ls -al
0
jamesccnacmpAuthor Commented:
In my home dir
total 34496
drwx------   13 james    james        4096 Apr 18 17:16 .
drwxr-xr-x    4 root     root         4096 Apr 15 20:09 ..
-rw-------    1 james    james         795 Apr 18 16:50 .bash_history
-rw-r--r--    1 james    james          24 Feb 11  2003 .bash_logout
-rw-r--r--    1 james    james         191 Feb 11  2003 .bash_profile
-rw-r--r--    1 james    james         124 Feb 11  2003 .bashrc
-rw-r--r--    1 james    james         847 Feb 20  2003 .emacs
drwx------    8 james    james        4096 Apr 18 17:16 evolution
-rw-rw-r--    1 james    james       39817 Apr 18 17:16 .fonts.cache-1
drwx------    5 james    james        4096 Apr 18 16:53 .gconf
drwx------    3 james    james        4096 Apr 18 17:13 .gconfd
drwx------    6 james    james        4096 Apr 18 12:36 .gnome
drwxr-xr-x    5 james    james        4096 Apr 18 16:50 .gnome2
drwx------    2 james    james        4096 Apr 14 07:02 .gnome2_private
drwxr-xr-x    2 james    james        4096 Apr 14 07:02 .gnome-desktop
drwx------    2 james    james        4096 Apr 14 07:03 .gnome_private
-rw-r--r--    1 james    james         120 Feb 26  2003 .gtkrc
-rw-rw-r--    1 james    james         136 Apr 14 07:02 .gtkrc-1.2-gnome2
-rw-------    1 james    james         219 Apr 18 16:53 .ICEauthority
-rw-------    1 james    james      987452 Apr 17 21:58 install_flash_player_7_linux.tar.gz
-rw-------    1 james    james      928768 Apr 14 11:51 IO142.ppt
-rw-------    1 james    james    16542512 Apr 19  2005 jre-1_5_0_02-linux-i586.bin
-rw-------    1 james    james    16007432 Apr 19  2005 jre-1_5_0_02-linux-i586-rpm.bin
drwx------    3 james    james        4096 Apr 14 07:02 .metacity
drwx------    3 james    james        4096 Apr 14 07:08 .mozilla
drwxr-xr-x    3 james    james        4096 Apr 14 07:02 .nautilus
-rw-------    1 james    james           0 Apr 14 07:02 .recently-used
-rw-------    1 james    james         533 Apr 16 11:57 .rhn-applet.conf
-rw-------    1 james    james      648933 Apr 16 11:20 shockwaveinstaller.exe
-rw-------    1 james    james         511 Apr 15 00:23 .viminfo
-rw-------    1 james    james         294 Apr 18 16:53 .Xauthority
-rw-------    1 james    james          79 Apr 18 16:53 .xsession-errors
0
wesly_chenCommented:
> -rw-------    1 james    james    16007432 Apr 19  2005 jre-1_5_0_02-linux-i586-rpm.bin
chmod a+x jre-1_5_0_02-linux-i586-rpm.bin
./jre-1_5_0_02-linux-i586-rpm.bin
su  (and provide the root password)
rpm -ivh  jre-1_5_0_02-linux-i586-rpm
0
jamesccnacmpAuthor Commented:
Do you agree to the above license terms? [yes or no]
yes
Unpacking...
Checksumming...
0
0
Extracting...
UnZipSFX 5.42 of 14 January 2001, by Info-ZIP (Zip-Bugs@lists.wku.edu).
  inflating: jre-1_5_0_02-linux-i586.rpm
error: cannot get exclusive lock on /var/lib/rpm/Packages
error: cannot open Packages index using db3 - Operation not permitted (1)
error: cannot open Packages database in /var/lib/rpm
 
Done.
0
wesly_chenCommented:
> error: cannot get exclusive lock on /var/lib/rpm/Packages
As I posted, you need to be "root" to install. So change the order
su  (and provide the root password)
./jre-1_5_0_02-linux-i586-rpm.bin
rpm -ivh  jre-1_5_0_02-linux-i586-rpm
0
kasper2003Commented:
i dont know why don't check out the links i posted before (the first respond). there is a step by step instruction with screenshoot to help you set up java on linux.

here you go again.

 if you want to run java applet on web pages/java programs read this.
http://java.com/en/download/help/linux_install.xml
0
RoachCommented:
Apache + Tomcat
0
jamesccnacmpAuthor Commented:
this is the output when I tried to install java, this is how far and this the error I get
help
wesly_chen!

Do you agree to the above license terms? [yes or no]
yes
Unpacking...
Checksumming...
0
0
Extracting...
UnZipSFX 5.42 of 14 January 2001, by Info-ZIP (Zip-Bugs@lists.wku.edu).
replace jre-1_5_0_02-linux-i586.rpm? [y]es, [n]o, [A]ll, [N]one, [r]ename: y
  inflating: jre-1_5_0_02-linux-i586.rpm
error: cannot get exclusive lock on /var/lib/rpm/Packages
error: cannot open Packages index using db3 - Operation not permitted (1)
error: cannot open Packages database in /var/lib/rpm
 
Done.
[james@c-67-162-251-189 james]$
0
wesly_chenCommented:
Did you run it as "root"?
0
jamesccnacmpAuthor Commented:
I am new to redhat I am going to a class next month for Unix and linux
so I think i am in the root

I type ls -al?

[james@c-67-162-251-189 james]$
0
wesly_chenCommented:
> so I think i am in the root
Please do
id
Or
whoami

those 2 commands will tell you who you are.

su -
will switch to root.
0
wesly_chenCommented:
> [james@c-67-162-251-189 james]$
From the prompt, you are not "root", you are "james" ( james@.... )

Just type
su
and provide the root password.

That's the error messages complain about. Because java installation need to be "root" (Administrator in M$ Windows)
0
jamesccnacmpAuthor Commented:
this is what I did

[james@c-67-162-251-189 james]$ id
uid=500(james) gid=500(james) groups=500(james)
[james@c-67-162-251-189 james]$ whoami
james
[james@c-67-162-251-189 james]$ su
Password:
[root@c-67-162-251-189 james]#
0
wesly_chenCommented:
> [root@c-67-162-251-189 james]#
You are root now.

Run
./jre-1_5_0_02-linux-i586-rpm.bin
0
wesly_chenCommented:
[root@c-67-162-251-189 james]# whoami
root   <=== ?

[root@c-67-162-251-189 james]# id
uid=0(root)  <=== ?
0
jamesccnacmpAuthor Commented:
it work
0
jamesccnacmpAuthor Commented:
now what is next?
0
wesly_chenCommented:
How about
rpm -ivh  jre-1_5_0_02-linux-i586-rpm
Then the java is installed /usr/java/jre-1_5_0_02.
/usr/java/jre-1_5_0_02/bin/java -fullversion

Then you need to set JAVA_HOME
export JAVA_HOME=/usr/java/jre-1_5_0_02
export PATH=$JAVA_HOME/bin:$PATH

How to use java? It depends on which application you are using.
If you have a java script/files, say test.class, then
/usr/java/jre-1_5_0_02/bin/java  test.class
0
kasper2003Commented:
the files you download is a bin file (it is like exe in windows) it is not a rmp installatioin pakage.
all you have to do is go to the directory where you have the bin file and type

./j2re-1_4_2_04-linux-i586.bin

there are additional steps you need to make java work with web browser. a soft link in the web browser plugin directory to be specific.

check out the first reply there is a like to step by step instruction with screenshoots show you how to setup java.

FYI: Due to  "shockwave is the program I need to in install so I can see the web page. "
java will NOT make shockwave run on linux.


0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Installation

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.