Автор Тема: Installing Oracle jre7 and jdk 7 and making jdk the default  (Прочитано 2779 раз)

Оффлайн kujirasan

  • Участник
  • *
  • Сообщений: 19
I have installed jre and jdk,:
 jdk1.7.0_25  jre1.7.0_25

but they not default, how is it to configure java and make it default, both of r the system and the browsers, firefox, chromium and opera,

This command does not work on ALT Linux:

/usr/sbin/alternatives --config java !

So what is the command for this ALT Linux to configure java?

Оффлайн Skull

  • Глобальный модератор
  • *****
  • Сообщений: 20 198
    • Домашняя страница
Re: Installing Oracle jre7 and jdk 7 and making jdk the default
« Ответ #1 : 09.08.2013 15:56:27 »
alternatives-manual /usr/bin/java /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.1.x86_64/jre/bin/java
alternatives-update
Андрей Черепанов (cas@)

Оффлайн kujirasan

  • Участник
  • *
  • Сообщений: 19
Re: Installing Oracle jre7 and jdk 7 and making jdk the default
« Ответ #2 : 09.08.2013 16:42:12 »
Hi Skull, thanks for the prompt reply, the command does not work

 /usr/bin/java:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.1.x86_64/jre/bin/java - invalid alternative


I am trying to get rid of openjdk, it is causing lot of problem,  the aim is to use Oracle, and latest one!

Оффлайн Vovka-Korovka

  • alt linux team
  • ***
  • Сообщений: 1 186
  • True Metal Cow
Re: Installing Oracle jre7 and jdk 7 and making jdk the default
« Ответ #3 : 09.08.2013 16:54:35 »
Hi Skull, thanks for the prompt reply, the command does not work

 /usr/bin/java:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.1.x86_64/jre/bin/java - invalid alternative


I am trying to get rid of openjdk, it is causing lot of problem,  the aim is to use Oracle, and latest one!

Do the same for Oracle. Skull just provided example. We don't know how and where you installed your JDK. May be better to use nosrc rpm for Oracle Java

ftp://ftp.linux.kiev.ua/pub/Linux/ALT/people/viy/java-1.7.0-oracle/

and build rpm package. Result rpm package will do alternatives-update itself.

Оффлайн kujirasan

  • Участник
  • *
  • Сообщений: 19
Re: Installing Oracle jre7 and jdk 7 and making jdk the default
« Ответ #4 : 10.08.2013 11:20:01 »
Hi Vovka, and thanks for the reply,
this the file structure


dir
bin   etc   lib64   mnt   root  selinux           sys  var
boot  home  lost+found   opt   run   skype-2.2.0.35-alt1.i586.rpm  tmp
dev   lib   media   proc  sbin  srv              usr

cd /usr/java

 java]$ dir
java]$ dir
default  jdk1.7.0_25  jre1.7.0_25  latest


java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)