How to change the configuration path to pick a different JAVA executable?
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
0
down vote
favorite
I have a *nix VM allocated me running CEL6.x version. The JVM pre-built in the image is 1.6 version (which is located under /usr/bin).
Now I need to have Eclipse in the VM. I have a Eclipse executable which needs JVM 1.8 or above.
Unfortunately, i dont have necessary permission to install any software on the VM.
Fortunately, discovered that in one of the mounted path /abc/bin, java-1.8.0_91 is present.
Now I need a way, when we execute java, the one present under /abc/bin (Java 1.8) should be picked rather than the default one present under /usr/bin (Java 1.6).
Any environmental variable i need to change to make this working? Say, JAVA_HOME or something like that.
command-line java eclipse environment-variables
add a comment |Â
up vote
0
down vote
favorite
I have a *nix VM allocated me running CEL6.x version. The JVM pre-built in the image is 1.6 version (which is located under /usr/bin).
Now I need to have Eclipse in the VM. I have a Eclipse executable which needs JVM 1.8 or above.
Unfortunately, i dont have necessary permission to install any software on the VM.
Fortunately, discovered that in one of the mounted path /abc/bin, java-1.8.0_91 is present.
Now I need a way, when we execute java, the one present under /abc/bin (Java 1.8) should be picked rather than the default one present under /usr/bin (Java 1.6).
Any environmental variable i need to change to make this working? Say, JAVA_HOME or something like that.
command-line java eclipse environment-variables
"CEL6.x version" doesn't sound like Ubuntu
â steeldriver
Apr 9 at 19:30
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a *nix VM allocated me running CEL6.x version. The JVM pre-built in the image is 1.6 version (which is located under /usr/bin).
Now I need to have Eclipse in the VM. I have a Eclipse executable which needs JVM 1.8 or above.
Unfortunately, i dont have necessary permission to install any software on the VM.
Fortunately, discovered that in one of the mounted path /abc/bin, java-1.8.0_91 is present.
Now I need a way, when we execute java, the one present under /abc/bin (Java 1.8) should be picked rather than the default one present under /usr/bin (Java 1.6).
Any environmental variable i need to change to make this working? Say, JAVA_HOME or something like that.
command-line java eclipse environment-variables
I have a *nix VM allocated me running CEL6.x version. The JVM pre-built in the image is 1.6 version (which is located under /usr/bin).
Now I need to have Eclipse in the VM. I have a Eclipse executable which needs JVM 1.8 or above.
Unfortunately, i dont have necessary permission to install any software on the VM.
Fortunately, discovered that in one of the mounted path /abc/bin, java-1.8.0_91 is present.
Now I need a way, when we execute java, the one present under /abc/bin (Java 1.8) should be picked rather than the default one present under /usr/bin (Java 1.6).
Any environmental variable i need to change to make this working? Say, JAVA_HOME or something like that.
command-line java eclipse environment-variables
command-line java eclipse environment-variables
asked Apr 9 at 18:31
Darshan L
1
1
"CEL6.x version" doesn't sound like Ubuntu
â steeldriver
Apr 9 at 19:30
add a comment |Â
"CEL6.x version" doesn't sound like Ubuntu
â steeldriver
Apr 9 at 19:30
"CEL6.x version" doesn't sound like Ubuntu
â steeldriver
Apr 9 at 19:30
"CEL6.x version" doesn't sound like Ubuntu
â steeldriver
Apr 9 at 19:30
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
The update-alternatives command will let you pick which version of Java to use:
user@host:~$ update-alternatives --config java
While it's generally not a good idea to change it manually (use the command above), you can observe that the actual java binary used when you type "java" is controlled by a series of symbolic links:
user@host:~$ which java
/usr/bin/java
user@host:~$ ls -l /usr/bin/java
lrwxrwxrwx 1 root root 22 Jan 3 09:03 /usr/bin/java -> /etc/alternatives/java
user@host:~$ ls -l /etc/alternatives/java
lrwxrwxrwx 1 root root 46 Jan 3 09:03 /etc/alternatives/java -> /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
This allows - for the <name> group and ask the user to select which one to use. When i try this it says, "update-alternatives: error: no alternatives for java" Since i dont have an alternate version made available. So how would i do that? I tried using --install and also --set option. But none of them helped in achieving what i needed.
â Darshan L
Apr 12 at 8:51
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
The update-alternatives command will let you pick which version of Java to use:
user@host:~$ update-alternatives --config java
While it's generally not a good idea to change it manually (use the command above), you can observe that the actual java binary used when you type "java" is controlled by a series of symbolic links:
user@host:~$ which java
/usr/bin/java
user@host:~$ ls -l /usr/bin/java
lrwxrwxrwx 1 root root 22 Jan 3 09:03 /usr/bin/java -> /etc/alternatives/java
user@host:~$ ls -l /etc/alternatives/java
lrwxrwxrwx 1 root root 46 Jan 3 09:03 /etc/alternatives/java -> /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
This allows - for the <name> group and ask the user to select which one to use. When i try this it says, "update-alternatives: error: no alternatives for java" Since i dont have an alternate version made available. So how would i do that? I tried using --install and also --set option. But none of them helped in achieving what i needed.
â Darshan L
Apr 12 at 8:51
add a comment |Â
up vote
0
down vote
The update-alternatives command will let you pick which version of Java to use:
user@host:~$ update-alternatives --config java
While it's generally not a good idea to change it manually (use the command above), you can observe that the actual java binary used when you type "java" is controlled by a series of symbolic links:
user@host:~$ which java
/usr/bin/java
user@host:~$ ls -l /usr/bin/java
lrwxrwxrwx 1 root root 22 Jan 3 09:03 /usr/bin/java -> /etc/alternatives/java
user@host:~$ ls -l /etc/alternatives/java
lrwxrwxrwx 1 root root 46 Jan 3 09:03 /etc/alternatives/java -> /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
This allows - for the <name> group and ask the user to select which one to use. When i try this it says, "update-alternatives: error: no alternatives for java" Since i dont have an alternate version made available. So how would i do that? I tried using --install and also --set option. But none of them helped in achieving what i needed.
â Darshan L
Apr 12 at 8:51
add a comment |Â
up vote
0
down vote
up vote
0
down vote
The update-alternatives command will let you pick which version of Java to use:
user@host:~$ update-alternatives --config java
While it's generally not a good idea to change it manually (use the command above), you can observe that the actual java binary used when you type "java" is controlled by a series of symbolic links:
user@host:~$ which java
/usr/bin/java
user@host:~$ ls -l /usr/bin/java
lrwxrwxrwx 1 root root 22 Jan 3 09:03 /usr/bin/java -> /etc/alternatives/java
user@host:~$ ls -l /etc/alternatives/java
lrwxrwxrwx 1 root root 46 Jan 3 09:03 /etc/alternatives/java -> /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
The update-alternatives command will let you pick which version of Java to use:
user@host:~$ update-alternatives --config java
While it's generally not a good idea to change it manually (use the command above), you can observe that the actual java binary used when you type "java" is controlled by a series of symbolic links:
user@host:~$ which java
/usr/bin/java
user@host:~$ ls -l /usr/bin/java
lrwxrwxrwx 1 root root 22 Jan 3 09:03 /usr/bin/java -> /etc/alternatives/java
user@host:~$ ls -l /etc/alternatives/java
lrwxrwxrwx 1 root root 46 Jan 3 09:03 /etc/alternatives/java -> /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
answered Apr 9 at 23:34
Omegamormegil
1,074710
1,074710
This allows - for the <name> group and ask the user to select which one to use. When i try this it says, "update-alternatives: error: no alternatives for java" Since i dont have an alternate version made available. So how would i do that? I tried using --install and also --set option. But none of them helped in achieving what i needed.
â Darshan L
Apr 12 at 8:51
add a comment |Â
This allows - for the <name> group and ask the user to select which one to use. When i try this it says, "update-alternatives: error: no alternatives for java" Since i dont have an alternate version made available. So how would i do that? I tried using --install and also --set option. But none of them helped in achieving what i needed.
â Darshan L
Apr 12 at 8:51
This allows - for the <name> group and ask the user to select which one to use. When i try this it says, "update-alternatives: error: no alternatives for java" Since i dont have an alternate version made available. So how would i do that? I tried using --install and also --set option. But none of them helped in achieving what i needed.
â Darshan L
Apr 12 at 8:51
This allows - for the <name> group and ask the user to select which one to use. When i try this it says, "update-alternatives: error: no alternatives for java" Since i dont have an alternate version made available. So how would i do that? I tried using --install and also --set option. But none of them helped in achieving what i needed.
â Darshan L
Apr 12 at 8:51
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1023420%2fhow-to-change-the-configuration-path-to-pick-a-different-java-executable%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
"CEL6.x version" doesn't sound like Ubuntu
â steeldriver
Apr 9 at 19:30