LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Java Virtual Machine (https://www.linuxquestions.org/questions/linux-newbie-8/java-virtual-machine-107408/)

gilch 10-22-2003 11:34 PM

Java Virtual Machine
 
I am trying to install LimeWareLinux.bin and it does this:

>Preparing to install...
>Extracting the installation resources from the installer archive...
>Configuring the installer for this system's environment...
>No Java virtual machine could be found from your PATH
>environment variable. You must install a VM prior to
>running this program.

I am using Mandrake Linux 9.1. Does anyone know what I have to do in order to successfully install LimeWareLinux.bin?

h/w 10-22-2003 11:48 PM

as the error msg says, it needs the java vm to run. if you have installed it, and this things not picking it up, insert that path to the vm to your shells "PATH".

now, if you dont have java vm, get it from java.sun.com

homme 10-23-2003 12:06 AM

POST stuff
 
same issue here - java vm is installed - how do i insert the path to the vm in the shell's path? i don't really know what the "path" is...new to linux.

h/w 10-23-2003 12:30 AM

if you're using bash as ur shell,

first find the place you have placed java.
in my case, its under "/home/abc/src/j2sdk1.4.2_01/bin"

so, i edit my ".bash_profile" (make it if its not there), and add the lines

Code:

PATH=$PATH:/home/abc/src/j2sdk1.4.2_01/bin
export PATH

and then to check it, do
"echo $PATH"

and you should see the path to java added

homme 10-23-2003 12:44 AM

almost
 
i don't have a '.bash_profile', and i created one with nano, but when i ran echo $PATH there was no java on it...do i have to edit a bash profile file that i already have? if so, where is this file located, and what's it called? thanks for the help, and the quick response.

h/w 10-23-2003 12:48 AM

alternately, u can just type that command at prompt:

"export PATH=$PATH:/home/abc/src/j2sdk1.4.2_01/bin"

"echo $PATH" will now show you.

but u wont have to do it everytime if you write it in .bash_profile, which is to be under the user home dir. in my case, "/home/abc" [/home/abc/.bash_profile]

and umm, after u create the file, u have to write the command in it. like a batchj file thingie. so /home/abc/.bash_profile will contain "PATH=$PATH:/home/abc/src/j2sdk1.4.2_01/bin
export PATH"

megaspaz 10-23-2003 12:55 AM

also you can set the Java path permanently for all users by editing your /etc/profile which the last 3 lines of the example is what you want to add.

Code:

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

pathmunge /usr/X11R6/bin after

JAVA_HOME=/usr/java/j2sdk1.4.2_01
pathmunge $JAVA_HOME/bin after
export JAVA_HOME

most likely after adding this you will have to logout and log back in so the /etc/profile file will be read again.

homme 10-23-2003 01:33 AM

ok
 
ok - writing it in at the command prompt works - it shows up in echo.
but copying into the .bash_profile doesn't seem to work. There was already a PATH=$PATH:$Home/bin there - i tried putting the java after that, and also erasing that and putting it in instead. In both cases, i saved and quit, but then the java didn't show up in echo. it did work at the prompt though, and then i ran limewire installer which worked, but the new problem is that it's in the /root dir, which nautilus won't let me access! i can't change the permissions on the folder, even when i'm logged in as root. that's an odd one.
any ideas there?
question #2 is, for adding java to the /etc/profile like megaspaz suggests, should i add all the lines of code in his example, or just the last three? i don't have any of that pathmunge stuff in my /etc/profile.
know that's a lot - and i'm going to bed - hopefully some answers as i wake. thanks yall.

megaspaz 10-23-2003 01:38 AM

Re: ok
 
Quote:

Originally posted by homme
ok - writing it in at the command prompt works - it shows up in echo.
but copying into the .bash_profile doesn't seem to work. There was already a PATH=$PATH:$Home/bin there - i tried putting the java after that, and also erasing that and putting it in instead. In both cases, i saved and quit, but then the java didn't show up in echo. it did work at the prompt though, and then i ran limewire installer which worked, but the new problem is that it's in the /root dir, which nautilus won't let me access! i can't change the permissions on the folder, even when i'm logged in as root. that's an odd one.
any ideas there?
question #2 is, for adding java to the /etc/profile like megaspaz suggests, should i add all the lines of code in his example, or just the last three? i don't have any of that pathmunge stuff in my /etc/profile.
know that's a lot - and i'm going to bed - hopefully some answers as i wake. thanks yall.

just the last three. but copy them in the same place of your /etc/profile. not sure if that's necessary though. but since mine works, you may want to do that.

edit: also make sure the java path you use is right. sun has 2 types of downloads. the JRE and SDK. mine uses the sdk file path. If you're using the JRE, you need to use that file path.


All times are GMT -5. The time now is 03:08 AM.