OpenSUSE 11.4 install successful as far as I can determine but want to run with Java 1.6.0_23.
Java installed OK but despite repeated changes to /etc/profile, /etc/java/java.conf, /etc/environment and renaming alljava.csh and alljava.sh in /etc/profile.d each reboot sets JAVA_HOME and JRE_HOME back to their previous settings /usr/lib/jvm/jre
I would appreciate some thoughts, I suspect there are many more files that set these variables and I either want to find and correct all these or completely remove all Java (multiple versions seem to have been installed by OpenSUSE 11.4) and start again.
Apologies, complete newbie so will need some hand-holding / simple instructions.
On 2011-10-26 15:26, activenewbie wrote:
>
> Hello
>
> OpenSUSE 11.4 install successful as far as I can determine but want to
> run with Java 1.6.0_23.
>
> Java installed OK but despite repeated changes to /etc/profile,
> /etc/java/java.conf, /etc/environment and renaming alljava.csh and
Use update-alternatives
–
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)
In 11.3 there is a script to change java environments that set all the necessary variables. I don’t recall it’s name/location right now, but it shouldn’t be too hard to find references to it in these fora. I guess it’s still there in 11.4.
Another option may be to remove the unwanted java packages (openjdk, icetea or whatever) with yast’s software manager. This will set the required environment variables in an unmodified system. Not sure about what you already changed, YMMV.
> or completely remove all Java (multiple versions seem to have been
> installed by OpenSUSE 11.4) and start again.
a default install of openSUSE 11.4 will install openJDK, only…
so, i can only guess you installed Java 1.6.0_23 on top, without first
uninstalling the open java…
question: must you run the _23 or is it ok to run the newer _26, like me:
denverd@linux-os114:~> java -version
java version “1.6.0_26”
Java™ SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot™ Client VM (build 20.1-b02, mixed mode)
if so, it is pretty simple to install using YaST > Software Management,
just launch that (give root pass when requested) search on java select
to uninstall the openJDK and add the SUN Java…
> Apologies, complete newbie so will need some hand-holding / simple
> instructions.
Been a few years since I’ve done this, AFAIK nothingg has changed. Do a search for threads related to me and java.
AFAIK update-alternatives only enables you to choose and activate an installed jvm or jdk, there is nothing that supports configuring persistent java environment variables.
The correct procedure should be in my old threads, or if you really think you’ve tried your best then post exactly what you’ve tried and the reference you’re using as a guide.
Frankly, I’m not sure what you’re doing in bashrc.
You should be setting your JAVA environment variables in a profile, and if you follow the instructions in /etc/profile, you will be instructed not to modify the contents of that file, you should create a custom file called profile.local which contains your custom commands. Do it that way, it has worked for me in the past.
As for your latest error, could your problem be exactly as the error states… you’re pointing not to an executable file - it’s a directory? Inspect the target location and verify.
Also, note that an alternative way to restart a Service is through the Advanced Services configuration in YAST. It might not be your primary method but can be a backup way of checking whether your work is sound.