Gnutella Forums

Gnutella Forums (https://www.gnutellaforums.com/)
-   General Linux Support (https://www.gnutellaforums.com/general-linux-support/)
-   -   Installing Java (https://www.gnutellaforums.com/general-linux-support/18536-installing-java.html)

Bag_O_Hammers June 23rd, 2003 05:00 PM

I still don't get it.

My profile looks like this:
========================

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

loginsh=1

# 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

j-------------------

Java is installed in:
/usr/java/j2re1.4.1_03/bin


What do I' do ?????

dumb as a bag O' hammers

GertDeSmet July 10th, 2003 12:24 AM

RE
 
I have followed the procedure and i still cant run Java. When i do java -version it says java command not found. here is my profile :

PATH=/usr/java/j2re-1.4.0_03/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/julien/bin
JAVA_HOME=/usr/java/j2re-1.4.0_03
PATH=/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/julien/bin
export JAVA_HOME

thnx a lot in advance 4 ur help ;)

gert

nDiScReEt July 12th, 2003 05:11 PM

Here Is The 411
 
Quote:

Originally posted by GertDeSmet
I have followed the procedure and i still cant run Java. When i do java -version it says java command not found. here is my profile :

PATH=/usr/java/j2re-1.4.0_03/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/julien/bin
JAVA_HOME=/usr/java/j2re-1.4.0_03
PATH=/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/julien/bin
export JAVA_HOME

thnx a lot in advance 4 ur help ;)

gert

First, $JAVA_HOME should be written before your $PATH statement.
Second, Your path statement with your $JAVA_HOME path statement should be written as follows:

PATH=$JAVA_HOME/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/julien/bin

So your profile should look like this:

JAVA_HOME=/usr/java/j2re-1.4.0_03
PATH=$JAVA_HOME/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/julien/bin


Next you would need to type:

source /etc/profile

or

. /etc/profile #make sure there is a space between the period (.) and slash (/).

or

source ~/.bash_profile

or

. ~/.bash_profile #Make sure there is a space between the period (.) and tilde (~).

or simply logout and then back in to your system to initialize your system to use the new changes to your shell environment.

The dot/period (.) is the same as the "source" command on most systems that don't recognize the "source" command.

HTH

altoine

sly1x October 6th, 2003 07:27 PM

/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/schley/bin
Thats my path for right now, but what command do i use in terminal to change it :S?

b4k4^2 October 6th, 2003 07:50 PM

There is no one command. You have to edit /etc/profile as root is in the instructions. Before you do anything, read the orignal post for datails and read the replies for additional hints. Make sure you understand what is going on before you change anything.

sly1x October 6th, 2003 07:55 PM

Ok I opened it up with vi. only thing I can see to change is this

# Path manipulation
if [ `id -u` = 0 ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
fi

pathmunge /usr/X11R6/bin after

ga1ahad83 October 10th, 2003 07:42 AM

please bare with me.....retarded newb
 
ok, im sorry for my lack of understanding on how to do this. i have installed the vm, but limewire installer wont reconize the vm. i am running mandrake 9.1 and my profile looks like this......

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

loginsh=1

JAVA_HOME=/usr/java/j2re1.4.0_01
PATH=$JAVA_HOME/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/pyriel/bin
export JAVA_HOME

# 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
*/

im confused. .. .thank you for your time.

nDiScReEt October 19th, 2003 12:48 AM

Re: please bare with me.....retarded newb
 
Quote:

Originally posted by ga1ahad83
ok, im sorry for my lack of understanding on how to do this. i have installed the vm, but limewire installer wont reconize the vm. i am running mandrake 9.1 and my profile looks like this......

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

loginsh=1

JAVA_HOME=/usr/java/j2re1.4.0_01
PATH=$JAVA_HOME/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/pyriel/bin
export JAVA_HOME


You are almost there. The only problem in your /etc/profile entry is that you followed our examples to the letter. What I mean by that is more than likely you have an upgraded java VM then our example's java VM. So, I doubt you installed j2re-1.4.0 onto your system. Run this command on the command line:

rpm -ql j2re|more

It should show your current (and more updated) java VM path as /usr/java/j2re1.4.2_01 or something to that extent.

Put the updated path into your /etc/profile or ~/.bash_profile like so (Just an example. Your mileage may vary):

<snip>
JAVA_HOME=/usr/java/j2re1.4.2_01
PATH=$JAVA_HOME/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/pyriel/bin

export JAVA_HOME
<snip>

HTH

altoine

mpatt December 9th, 2004 10:22 PM

Java Installation
 
Just want to say Thanks!!! I'm new to Linux and was able to walk thru installing JAVA.... Alll Looks well............

Hintza February 27th, 2005 04:21 PM

xterm and gnome can't find Java
 
I just installed Sun's JRE (v1.5.0_01), and LimeWire 4.6.0. I updated my /etc/profile file.

When I open a GNOME Terminal, and try to run LimeWire, it can't find my JRE. Apparently, neither GNOME Terminals nor X Terminals run /etc/profile, so my path doesn't get set appropriately. Yes, I can manually source /etc/profile, and then Java works fine. But I don' t want to have to do this every time. Is there any way to automatically set my path, so that GNOME and X Terminals inherit this updated path? (I want to do this system-wide, not just for one user.)

Similarly, I really want to run LimeWire from the Gnome menu. However, when I try this (either via a shortcut, or via the Run Application dialog), nothing happens. I suspect that whatever path Gnome is using isn't set by /etc/profile. Any thoughts on how to change this path? (preferably system-wide)

As a last resort, I edited "runLime.sh", and sourced /etc/profile within it. This is far from ideal. Any global fixes (which would enable me to run other Java apps from within Gnome) would be greatly appreciated.


All times are GMT -7. The time now is 01:00 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.

Copyright © 2020 Gnutella Forums.
All Rights Reserved.