LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Installing Java2 RE from .bin (https://www.linuxquestions.org/questions/linux-newbie-8/installing-java2-re-from-bin-33091/)

GT I.N.C 10-17-2002 11:35 PM

Installing Java2 RE from .bin
 
I chmod' it ran it and everything....it printed on the screen a bunch of inflating creating etc etc.....now what do i do...i tried a search....but couldn't find it......i need java cause i wish to try this program http://www.tanveer.freeservers.com/p...shDownload.htm

Is there another script to execute after this or something?

Garry :D

GT I.N.C 10-17-2002 11:40 PM

Oh by the way i found a zip file which was created after all the inflating extracting stuff named javaws-1_2_0_01-linux-i586-i.zip i extracted it and it had a script file 'install.sh' i ran that and it asked this and i don't know where to go on: (above was all that licensing agreement stuff)
Code:

Do you agree to the above license terms? [yes or no]
          yes
In order to use Java(tm) Web Start you must have a version of Java 2 standard edition
installed. If you do not, you can download one from http://java.sun.com.
Please enter the path of your installation (eg /usr/local/java/jdk1.2):

i tried various paths and i tried locating java but i couldn't find it.....hope this is enough info...

Garry :D

MasterC 10-18-2002 12:43 AM

Whatis that program?

Anyway, which version do you have? It should have deflated into the directory into which it was. So if:
Java.whatever.bin was in:
/home/files/Java.whatever.bin
and you ran it from there, it should have decompressed there, and now you should move the decompressed folder to /usr/loca/bin/java with:
mv /path/to/decompressed/folder /usr/loca/bin/java

And set your $PATH.

What distro?

Cool

GT I.N.C 10-18-2002 12:47 AM

Is the folder named 'j2re1.4.1_01' i'm running Mandrake 8.2...

Oh and i have heard this $PATH thing alot and i have an idea what it is, but how would i go on setting it?

Garry :D

GT I.N.C 10-18-2002 12:48 AM

Oh and it's some graphic program which i found on tucows i found it interesting and wanted to try it, and it said i needed java, so i thought might aswell install it :)

Garry :D

MasterC 10-18-2002 12:55 AM

Cool...

You might have either a .bash_profile in your ~ directory to edit your $PATH or you might have /etc/profile to edit your path, either one is fine.

As for the folder, yes it probably is, so here is the command to move it (remember you must be root and that you are in the directory that this file exists):
mv j2re1.4.1_01 /usr/local/bin/java

Just like that, you can copy and paste if you'd like. Some people like to move the folder and have the name remain the same, no problems there, you will just have to follow with a symlink to /usr/local/bin/java afterwards, or adjust what you place in your $PATH to show the j2re1.4.1_01 as your java folder.

Oh and 1 more thing, you will actually want to add the bin subdirectory in the j2re1.4.1_01 folder. SO...

Enter the j2re1.4.1_01 folder, make sure you have a /bin directory there, if so, and if you choose to use my moving option then add this to your $PATH:
/usr/loca/bin/java/bin

Cool

GT I.N.C 10-18-2002 01:01 AM

I'm sorry MasterC but i kinda lost you after the move thing ;)
I moved the folder via command to /usr/local/bin/java, now i am lost...
very very sorry hehe....

Garry :D

MasterC 10-18-2002 01:06 AM

he he he, no problem, sometimes I move fast if I think I am boring you with details...

Ok, so you have it moved then, cool.

Now see if you have either (or both) /etc/profile AND/OR ~/.bash_profile

You can just look for them, no need to do a search.

Cool

GT I.N.C 10-18-2002 01:13 AM

Yep got em both...

Garry :D

MasterC 10-18-2002 01:20 AM

Ok so let's go for /etc/profile as it will work for all users that way...

Add the bold to your similar looking line:

Code:

# Set the default system $PATH:
PATH="/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/usr/local/bin/java/bin"

If that doesn't work, it's the last part:
/usr/local/bin/java/bin

Cool

GT I.N.C 10-18-2002 01:26 AM

This is my profile....i don't know where to put it, sorry....
Code:

# /etc/profile -*- Mode: shell-script -*-
# (c) MandrakeSoft, Chmouel Boudjnah <chmouel@mandrakesoft.com>

# Users generally won't see annoyng core files
[ "$UID" = "0" ] && ulimit -S -c 1000000 > /dev/null 2>&1

if ! echo ${PATH} |grep -q /usr/X11R6/bin ; then
    PATH="$PATH:/usr/X11R6/bin"
fi

if [ "$UID" -ge 500 ] && ! echo ${PATH} |grep -q /usr/games ; then
    export PATH=$PATH:/usr/games
fi

umask 022

USER=`id -un`
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"
HISTCONTROL=ignoredups
HOSTNAME=`/bin/hostname`
HISTSIZE=1000

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
    INPUTRC=/etc/inputrc
fi

# some old programs still use it (eg: "man"), and it is also
# required for level1 compliance for LI18NUX2000
NLSPATH=/usr/share/locale/%l/%N

export PATH PS1 USER LOGNAME MAIL HOSTNAME INPUTRC NLSPATH
export HISTCONTROL HISTSIZE

for i in /etc/profile.d/*.sh ; do
        if [ -x $i ]; then
                . $i
        fi
done

unset i


GT I.N.C 10-18-2002 01:26 AM

No wait i know where to put it now :p sorry again....once i put it in...how can i test if java works?

GT I.N.C 10-18-2002 01:29 AM

Ok very very sorry, i know where it goes, but i don't know how to insert it....geeeez i should concentrate more...

MasterC 10-18-2002 01:34 AM

No problem, it's not a biggie ;)

Open up a text editor, and place the following line in your file:
PATH="/usr/local/bin/java/bin"

Just below:
if [ "$UID" -ge 500 ] && ! echo ${PATH} |grep -q /usr/games ; then
export PATH=$PATH:/usr/games
fi

Just under the fi place the line I have above, just as it is. Then post what you did just to make sure it's all ok.

To paste, just highlight the text here, and click the middle mouse button on the area to paste into.

Cool

GT I.N.C 10-18-2002 01:39 AM

Ok done..here we go....
Code:

# /etc/profile -*- Mode: shell-script -*-
# (c) MandrakeSoft, Chmouel Boudjnah <chmouel@mandrakesoft.com>

# Users generally won't see annoyng core files
[ "$UID" = "0" ] && ulimit -S -c 1000000 > /dev/null 2>&1

if ! echo ${PATH} |grep -q /usr/X11R6/bin ; then
    PATH="$PATH:/usr/X11R6/bin"
fi

if [ "$UID" -ge 500 ] && ! echo ${PATH} |grep -q /usr/games ; then
    export PATH=$PATH:/usr/games
fi
PATH="/usr/local/bin/java/bin"

umask 022

USER=`id -un`
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"
HISTCONTROL=ignoredups
HOSTNAME=`/bin/hostname`
HISTSIZE=1000

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
    INPUTRC=/etc/inputrc
fi

# some old programs still use it (eg: "man"), and it is also
# required for level1 compliance for LI18NUX2000
NLSPATH=/usr/share/locale/%l/%N

export PATH PS1 USER LOGNAME MAIL HOSTNAME INPUTRC NLSPATH
export HISTCONTROL HISTSIZE

for i in /etc/profile.d/*.sh ; do
        if [ -x $i ]; then
                . $i
        fi
done

unset i



All times are GMT -5. The time now is 06:15 AM.