How to set Default Java VM/SDK in SuSE?
Hi All,
I'm running SuSE Linux Professional 8.0 I ran the command java -version to find which default VM the system used, and this is what it said: Quote:
Note: I have the J2SDK and J2RE installed in /usr/java. I verified the version like this: [QUOTE] samer@linux:/usr/java/j2re1.4.0_01/bin> java -version java version "1.4.0_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_01-b03) Java HotSpot(TM) Client VM (build 1.4.0_01-b03, mixed mode) samer@linux:/usr/java/j2re1.4.0_01/bin> [/QUOTE[ My Question Is this. How do I set the DEFAULT Java VM to be the 1.4 as opposed to the old 1.1.8??? Can anyone help? Thanx, |
The geeko might be cooler, but Tux is warmer:)
How is original java got installed? Is it kaffe? Find the appropriate RPM and remove it (can be kaffe). Other solution is to place java 1.4 in your path before the directory where the original java is. For instance, which java might return /usr/bin/java Java 1.4 is under /usr/java/bin/java so make you PATH to point to the newer java first export PATH=/usr/java/bin:$PATH to make it permanent add this line PATH=/usr/java/bin:$PATH in /etc/profile before export PATH YADA BLAH |
hmmm, BIG problem. I checked the /etc/profle file and it had ONE instance of the word PATH. It looked like this EXACTLY
Quote:
PATH=/usr/java/j2re/bin:$PATH so it looks like Quote:
I tried ls, startx, and vi and they all don't work (bad command, etc...). The ONLY command that DOES work is cd. HEEEELP! |
Uh-oh, that is probably due to the power failover (hard recycling), Did you save the file before the system froze, was that file open during crash?
|
I closed the file before the system froze. I was working on something entirely different in a console prompt (compiling a screen saver) when the system froze. In Any case, Im stuck with a pretty much useless Linux. Unless I can quote-unquote "fix" it I will be forced to re-install it :(
|
u probably overwrote the PATH variable. that is a real bad thing to do in linux. i did that myself a couple days ago. when booting the system it does not have any programs to mount sth and there's nothing more to say :(.
Suse defines the PATH in /etc/rc.config. so if u want to make changes or add java to the path u should be f***ing careful if u don't know exactly what you're doing for the future: export PATH="/usr/java/j2sdk/bin":$PATH export JAVA_HOME="/usr/java/j2sdk" place that under the definition of the PATH. if u chmod 0666 /etc/rc.config u might have access to it using the user bash. if u set the PATH for java in your /home/user/.bashrc first before editing the etc/rc.config -> then `source ~/.bashrc' and your user bash is still working u can apply the same changes to etc/rcconf keep going! jens |
Thanx j-ray. I will give that a shot :) :D
|
Ok I edited the rc.config file so it looks like this.
Quote:
Now I tried to see if the java has been set up, but no dice. Quote:
1.) Why would the jave not work? 2.) I have the Java SDK and JRE installed. As you can see above I am pointing to the JRE. Can Anyone offer some much appreciated insite here? |
1. u have point it to j2sdk-version/bin not to j2re
then 2. type 'java -version' logged in as user it's normal that u don't get sth just typing 'java' i guess it should be working -:) cheers, jens |
Nope, I pointed it to the directory, ran SuSEconfig, and still the same thing. I still get this:
Quote:
|
I even tried this, and it STILL does the same thing (as above):
Quote:
|
All times are GMT -5. The time now is 07:45 AM. |