Java

Discussions Regarding Software

Moderator: Moderators

Java

Postby joe74 » Wed Apr 11, 2012 0:49

I've just installed java (my system up-to-date with kernel 3.3), but when I try to run a simple app, or do a simple "java" command, it returns:

Code: Select all
joe74@chilitower ~ $ java
* Home for VM 'sun-jdk-1.6' does not exist: /usr/lib/jvm/sun-jdk-1.6
* Invalid System VM: sun-jdk-1.6


Never used java before in SL, thus my question. I didn't find anything related in here.

I'm not a java user, not regular user, but needed to run this.

Thanks for the help.
joe74
Baby Hen
 
Posts: 18
Joined: Sat Oct 22, 2011 19:55
Location: Nicaragua

Re: Java

Postby camelinahat » Wed Apr 11, 2012 13:42

Hi Joe74,

There was an issue with the default java-vm settings in some releases that may be resulting in this issue. We just need to reassign your java symlink to the correct version. Fortunately the eselect utility makes this very simple for us.

Code: Select all
$ su
# eselect java-vm list

You will receive a list of installed java virtual machines, You may also receive a couple errors at the top that there's no such file or directory. Chances are there's one that doesn't list an error at the top, on my system it's icedtea-7. Find the correlating number with that entry. Then:
Code: Select all
# eselect java-vm set <number>


If you also want to update your java plugin for your browser, you will need to do the same process with java-nsplugin (instead of java-vm).
User avatar
camelinahat
Baby Hen
 
Posts: 10
Joined: Wed Mar 21, 2012 14:01
Location: Cape Breton, NS Canada

Re: Java

Postby bernd_b » Fri Apr 13, 2012 21:20

What is wrong here?

Code: Select all
abayon-bb / # eselect java-vm list
Available Java Virtual Machines:
grep: /usr/share/java-config-2/vm/emul-linux-x86-java-1.6: No such file or directory
grep: /usr/share/java-config-2/vm/icedtea-6: No such file or directory
grep: /usr/share/java-config-2/vm/icedtea6-bin: No such file or directory
  [1]   emul-linux-x86-java-1.6
  [2]   icedtea-6
  [3]   icedtea6-bin
  [4]   icedtea-bin-7
  [5]   sun-jdk-1.6  system-vm

sabayon-bb / # eselect java-vm set 4
!!! Error: Usage [user|system] [vm]
exiting
bernd_b
Young Hen
 
Posts: 25
Joined: Thu Apr 05, 2012 22:42

Re: Java

Postby camelinahat » Fri Apr 13, 2012 21:40

Oops, looks like I missed a setting for user specific or system wide. Try:
Code: Select all
# eselect java-vm set system 4

Or possibly:
Code: Select all
# eselect java-vm set system icedtea-bin-7


Unfortunately, I'm not at my PC right now to verify which
User avatar
camelinahat
Baby Hen
 
Posts: 10
Joined: Wed Mar 21, 2012 14:01
Location: Cape Breton, NS Canada

Re: Java

Postby bernd_b » Sat Apr 14, 2012 10:33

Oops from me too
I always tried to replace "user|system" with something like "eselect java-vm set root system 4", but of course it is as simple as you wrote.
bernd_b
Young Hen
 
Posts: 25
Joined: Thu Apr 05, 2012 22:42

Re: Java

Postby joe74 » Mon Apr 16, 2012 18:30

camelinahat wrote:Oops, looks like I missed a setting for user specific or system wide. Try:
Code: Select all
# eselect java-vm set system 4

Or possibly:
Code: Select all
# eselect java-vm set system icedtea-bin-7


Unfortunately, I'm not at my PC right now to verify which


Thanks, camelinahat. It worked :)

Later for it to run the browser plugin:

Code: Select all
eselect java-nsplugin set 64bit icedtea-7


In case you have 64bits.
joe74
Baby Hen
 
Posts: 18
Joined: Sat Oct 22, 2011 19:55
Location: Nicaragua


Return to Software in General

Who is online

Users browsing this forum: No registered users and 1 guest