Uninstalling Linux Java

potissimus

Member
Oct 10, 2002
40
0
0
Hello. I'm having trouble getting Sun's Java 2 1.4.1 to work on my RedHat 8 box. I followed the instructions here and then installed LimeWire to test it out. It worked then, but I must have done something sometime afterward because now it doesn't work at all and I have no idea what i did :eek: Whenever I try to open LimeWire now, I get an error that says:
No Java virtual machine could be found from your PATH
environment variable. You must install a VM prior to
running this program.

After a lot of aggravation, I decided that I'd uninstall the package and then reinstall it. When I type in "rpm -e <package name>" into the terminal, however, the cursor moves to the next line and nothing happens. It just sits there blinking. The same happens if I try to do a -uvh. Does anyone know my problem, and how to fix it?

 

potissimus

Member
Oct 10, 2002
40
0
0
Yeah, I saw that in the error but I have no idea what it is. Using the search feature I found 2 files name path (no folders) in /etc/gconf/1/path and /etc/gconf/2/path, neither of which have anything to do with Java, and many others that contained path, but had nothing to do with Java either. I have a feeling that this is not what it means, however. Something to do with an executable file maybe?
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: potissimus
Yeah, I saw that in the error but I have no idea what it is. Using the search feature I found 2 files name path (no folders) in /etc/gconf/1/path and /etc/gconf/2/path, neither of which have anything to do with Java, and many others that contained path, but had nothing to do with Java either. I have a feeling that this is not what it means, however. Something to do with an executable file maybe?

It sounds like your $PATH is not set correctly.
 

potissimus

Member
Oct 10, 2002
40
0
0
so how do I set my $PATH correctly...
sry, for the newbie questions, but I have to learn somewhere.
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Originally posted by: n0cmonkey

It sounds like your $PATH is not set correctly.

To be a tad more specific - $PATH is a variable which tells the shell which directories to look through for executables. You can check its value with

echo $PATH

If you need to add a directory /opt/blah to the PATH, do

export PATH=$PATH:/opt/blah
 

potissimus

Member
Oct 10, 2002
40
0
0
I dont think fully understand yet. I got that path is something that tells the computer where to go to find executables (i think). So in my case, with LimeWire, would i export the path to the Limewire folder containing the executable (ex. export PATH=$PATH:/home/joebob/LimeWire)?
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: potissimus
I dont think fully understand yet. I got that path is something that tells the computer where to go to find executables (i think). So in my case, with LimeWire, would i export the path to the Limewire folder containing the executable (ex. export PATH=$PATH:/home/joebob/LimeWire)?

Since the original error is complaining about not being able to find the java virtual machine, you should make sure your $PATH includes the location of the java virtual machine. Some of these are newbie questions, and you do need to lern them somewhere, but there are FAQs here about some of this basic stuff. (The java thing is fine, not knowing what your $PATH is on the other hand is a little shady)
 

manly

Lifer
Jan 25, 2000
11,714
2,663
136
If you followed those instructions to the letter, then the JVM should work. Test it out:

java -version
/usr/bin/java -version

In those instructions, symlinks (think Windows shortcuts) are placed in /usr/bin which is by default part of your PATH, so you don't have to add the Java2 VM executables to your PATH environment variable.

It's possible, though fairly unlikely that your RPM database is hosed. You can try rebuilding it.

Having said it, it is virtually never necessary to do the uninstall/reinstall dance like you're accustomed to in Windows. In Linux (and UNIX), if things don't work, you find out why and fix the problem. The reinstall or reboot tricks usually won't work.

Also note that from a functional standpoint, Java on Windows works nearly identically on Windows as it does Linux (PATH comes into play on both platforms). The only difference is method of installation. Also, I don't believe the Java2 plugin currently works on the commercial GCC 3.2 systems (including Mandrake 9.0).

Basically, you need to find a quick tutorial on the BASH shell for Linux. Do a Google search.
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Originally posted by: manly

Also, I don't believe the Java2 plugin currently works on the commercial GCC 3.2 systems (including Mandrake 9.0).

This is possibly an issue. The plugin is a precompiled binary, and it's compiler version (usually 2.95) has to match the compiler version of your browser. Some distros compile Mozilla with GCC 2.95 in order to allow third-party plugins to work, some don't. I have no idea how Mandrake does it, or even how you would go about checking.
 

potissimus

Member
Oct 10, 2002
40
0
0
Well, i found out (and fixed) the problem. It turns out that java wasn't entirely installed...i know weird. Sorry about the easy stuff n0cmonkey, I'll make sure to do a more thorough search on my subjects in the future. Thanks, potissimus