Installation problem on jdk1.7.0_11












0















I am trying to install my ubuntu using the downloaded jdk1.7.0_11 and jre1.7.0_11,and i traced the questions from here and followed tat steps even it is not installing the java.
In the terminal , I am getting an error like this



Selection    Path                               Priority   Status
------------------------------------------------------------
* 0 /usr/lib/jvm/jre1.7.0_11/bin/java 3 auto mode
1 /usr/lib/jvm/jdk1.7.0_11/bin/java 1 manual mode
2 /usr/lib/jvm/jre1.7.0_11/bin/java 3 manual mode


Press enter to keep the current choice[*], or type selection number: 0
update-alternatives: warning: forcing reinstallation of alternative /usr/lib/jvm/jre1.7.0_11/bin/java because link group java is broken.
update-alternatives: warning: not replacing /usr/bin/java with a link.


pls guide me to work it possible to install java



Thank you










share|improve this question
















bumped to the homepage by Community 8 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • Its not an error message. its process of installation asking you to give the choice, you need to select the option that corresponds to your package. And that is the final step of installation, there after you could give $ java --version in terminal to check what you have installed.

    – VRU
    Jan 17 '13 at 11:00











  • i even tried tat by giving one of those options ,but i couldnt able to see the installed version of java by using the java --version,i am getting The program 'java' can be found in the following packages: * default-jre * gcj-4.6-jre-headless * openjdk-6-jre-headless * gcj-4.5-jre-headless * openjdk-7-jre-headless Try: sudo apt-get install <selected package> so i gave sudo apt-get install with the above packages it shows error as sridhar@sridhar-Satellite-A305:~$ sudo apt-get openjdk-6-jre-headless E: Invalid operation openjdk-6-jre-headless

    – Sridhar Ramakrishnan
    Jan 18 '13 at 6:39













  • forgot to ask you, have you tried it from Ubuntu Software Center?

    – VRU
    Jan 18 '13 at 7:27











  • yes that also i tried but its not installing :(

    – Sridhar Ramakrishnan
    Jan 18 '13 at 8:53
















0















I am trying to install my ubuntu using the downloaded jdk1.7.0_11 and jre1.7.0_11,and i traced the questions from here and followed tat steps even it is not installing the java.
In the terminal , I am getting an error like this



Selection    Path                               Priority   Status
------------------------------------------------------------
* 0 /usr/lib/jvm/jre1.7.0_11/bin/java 3 auto mode
1 /usr/lib/jvm/jdk1.7.0_11/bin/java 1 manual mode
2 /usr/lib/jvm/jre1.7.0_11/bin/java 3 manual mode


Press enter to keep the current choice[*], or type selection number: 0
update-alternatives: warning: forcing reinstallation of alternative /usr/lib/jvm/jre1.7.0_11/bin/java because link group java is broken.
update-alternatives: warning: not replacing /usr/bin/java with a link.


pls guide me to work it possible to install java



Thank you










share|improve this question
















bumped to the homepage by Community 8 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • Its not an error message. its process of installation asking you to give the choice, you need to select the option that corresponds to your package. And that is the final step of installation, there after you could give $ java --version in terminal to check what you have installed.

    – VRU
    Jan 17 '13 at 11:00











  • i even tried tat by giving one of those options ,but i couldnt able to see the installed version of java by using the java --version,i am getting The program 'java' can be found in the following packages: * default-jre * gcj-4.6-jre-headless * openjdk-6-jre-headless * gcj-4.5-jre-headless * openjdk-7-jre-headless Try: sudo apt-get install <selected package> so i gave sudo apt-get install with the above packages it shows error as sridhar@sridhar-Satellite-A305:~$ sudo apt-get openjdk-6-jre-headless E: Invalid operation openjdk-6-jre-headless

    – Sridhar Ramakrishnan
    Jan 18 '13 at 6:39













  • forgot to ask you, have you tried it from Ubuntu Software Center?

    – VRU
    Jan 18 '13 at 7:27











  • yes that also i tried but its not installing :(

    – Sridhar Ramakrishnan
    Jan 18 '13 at 8:53














0












0








0








I am trying to install my ubuntu using the downloaded jdk1.7.0_11 and jre1.7.0_11,and i traced the questions from here and followed tat steps even it is not installing the java.
In the terminal , I am getting an error like this



Selection    Path                               Priority   Status
------------------------------------------------------------
* 0 /usr/lib/jvm/jre1.7.0_11/bin/java 3 auto mode
1 /usr/lib/jvm/jdk1.7.0_11/bin/java 1 manual mode
2 /usr/lib/jvm/jre1.7.0_11/bin/java 3 manual mode


Press enter to keep the current choice[*], or type selection number: 0
update-alternatives: warning: forcing reinstallation of alternative /usr/lib/jvm/jre1.7.0_11/bin/java because link group java is broken.
update-alternatives: warning: not replacing /usr/bin/java with a link.


pls guide me to work it possible to install java



Thank you










share|improve this question
















I am trying to install my ubuntu using the downloaded jdk1.7.0_11 and jre1.7.0_11,and i traced the questions from here and followed tat steps even it is not installing the java.
In the terminal , I am getting an error like this



Selection    Path                               Priority   Status
------------------------------------------------------------
* 0 /usr/lib/jvm/jre1.7.0_11/bin/java 3 auto mode
1 /usr/lib/jvm/jdk1.7.0_11/bin/java 1 manual mode
2 /usr/lib/jvm/jre1.7.0_11/bin/java 3 manual mode


Press enter to keep the current choice[*], or type selection number: 0
update-alternatives: warning: forcing reinstallation of alternative /usr/lib/jvm/jre1.7.0_11/bin/java because link group java is broken.
update-alternatives: warning: not replacing /usr/bin/java with a link.


pls guide me to work it possible to install java



Thank you







java openjdk installation






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 17 '13 at 11:18









VRU

1,00521632




1,00521632










asked Jan 17 '13 at 10:45









Sridhar RamakrishnanSridhar Ramakrishnan

111




111





bumped to the homepage by Community 8 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 8 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Its not an error message. its process of installation asking you to give the choice, you need to select the option that corresponds to your package. And that is the final step of installation, there after you could give $ java --version in terminal to check what you have installed.

    – VRU
    Jan 17 '13 at 11:00











  • i even tried tat by giving one of those options ,but i couldnt able to see the installed version of java by using the java --version,i am getting The program 'java' can be found in the following packages: * default-jre * gcj-4.6-jre-headless * openjdk-6-jre-headless * gcj-4.5-jre-headless * openjdk-7-jre-headless Try: sudo apt-get install <selected package> so i gave sudo apt-get install with the above packages it shows error as sridhar@sridhar-Satellite-A305:~$ sudo apt-get openjdk-6-jre-headless E: Invalid operation openjdk-6-jre-headless

    – Sridhar Ramakrishnan
    Jan 18 '13 at 6:39













  • forgot to ask you, have you tried it from Ubuntu Software Center?

    – VRU
    Jan 18 '13 at 7:27











  • yes that also i tried but its not installing :(

    – Sridhar Ramakrishnan
    Jan 18 '13 at 8:53



















  • Its not an error message. its process of installation asking you to give the choice, you need to select the option that corresponds to your package. And that is the final step of installation, there after you could give $ java --version in terminal to check what you have installed.

    – VRU
    Jan 17 '13 at 11:00











  • i even tried tat by giving one of those options ,but i couldnt able to see the installed version of java by using the java --version,i am getting The program 'java' can be found in the following packages: * default-jre * gcj-4.6-jre-headless * openjdk-6-jre-headless * gcj-4.5-jre-headless * openjdk-7-jre-headless Try: sudo apt-get install <selected package> so i gave sudo apt-get install with the above packages it shows error as sridhar@sridhar-Satellite-A305:~$ sudo apt-get openjdk-6-jre-headless E: Invalid operation openjdk-6-jre-headless

    – Sridhar Ramakrishnan
    Jan 18 '13 at 6:39













  • forgot to ask you, have you tried it from Ubuntu Software Center?

    – VRU
    Jan 18 '13 at 7:27











  • yes that also i tried but its not installing :(

    – Sridhar Ramakrishnan
    Jan 18 '13 at 8:53

















Its not an error message. its process of installation asking you to give the choice, you need to select the option that corresponds to your package. And that is the final step of installation, there after you could give $ java --version in terminal to check what you have installed.

– VRU
Jan 17 '13 at 11:00





Its not an error message. its process of installation asking you to give the choice, you need to select the option that corresponds to your package. And that is the final step of installation, there after you could give $ java --version in terminal to check what you have installed.

– VRU
Jan 17 '13 at 11:00













i even tried tat by giving one of those options ,but i couldnt able to see the installed version of java by using the java --version,i am getting The program 'java' can be found in the following packages: * default-jre * gcj-4.6-jre-headless * openjdk-6-jre-headless * gcj-4.5-jre-headless * openjdk-7-jre-headless Try: sudo apt-get install <selected package> so i gave sudo apt-get install with the above packages it shows error as sridhar@sridhar-Satellite-A305:~$ sudo apt-get openjdk-6-jre-headless E: Invalid operation openjdk-6-jre-headless

– Sridhar Ramakrishnan
Jan 18 '13 at 6:39







i even tried tat by giving one of those options ,but i couldnt able to see the installed version of java by using the java --version,i am getting The program 'java' can be found in the following packages: * default-jre * gcj-4.6-jre-headless * openjdk-6-jre-headless * gcj-4.5-jre-headless * openjdk-7-jre-headless Try: sudo apt-get install <selected package> so i gave sudo apt-get install with the above packages it shows error as sridhar@sridhar-Satellite-A305:~$ sudo apt-get openjdk-6-jre-headless E: Invalid operation openjdk-6-jre-headless

– Sridhar Ramakrishnan
Jan 18 '13 at 6:39















forgot to ask you, have you tried it from Ubuntu Software Center?

– VRU
Jan 18 '13 at 7:27





forgot to ask you, have you tried it from Ubuntu Software Center?

– VRU
Jan 18 '13 at 7:27













yes that also i tried but its not installing :(

– Sridhar Ramakrishnan
Jan 18 '13 at 8:53





yes that also i tried but its not installing :(

– Sridhar Ramakrishnan
Jan 18 '13 at 8:53










2 Answers
2






active

oldest

votes


















0














As VRU said it is not an error, it is a selection. It appears when more than one version of a program is installed. In this case you can select which Java version is used to execute Java programs.



The top one is the presently selected. Below that all the options are listed. In this case you can choose between the JRE and the JDK. JRE is the Java Runtime Environment and is usually fine for running all Java programs. JDK is the Java Development Kit. It is mainly needed to compile Java programs. Some programming tools require to be run with the JDK instead of JRE. If you are not developing programs in Java, selecting the JRE is fine.



If you had Java 6 (or 5) installed alongside with Java 7, it would also appear in this list.



You can check the version using java --version. The selection can be changed later on with sudo update-java-alternatives. Try forcing this.



If it doesn't work reinstall the java packages. If you are not developing Java you could also remove the JDK entirely, making the selection obsolete.






share|improve this answer


























  • i even tried tat by giving one of those options ,but i couldnt able to see the installed version of java by using the java --version,i am getting The program 'java' can be found in the following packages: * default-jre * gcj-4.6-jre-headless * openjdk-6-jre-headless * gcj-4.5-jre-headless * openjdk-7-jre-headless Try: sudo apt-get install <selected package> so i gave sudo apt-get install with the above packages it shows error as sridhar@sridhar-Satellite-A305:~$ sudo apt-get openjdk-6-jre-headless E: Invalid operation openjdk-6-jre-headless

    – Sridhar Ramakrishnan
    Jan 18 '13 at 6:41



















0














In my system I have installed OpenJDK in offline mode and it went successful. I am sharing you the same. Before you start, remove all old files so that you don't get in to any confusion and start with any one i.e., either JDK or JRE.



Installation of OpenJDK on Ubuntu :



1) Download OpenJDK



2) Extract the tar file.(using any of the two steps)



      Right click on the .tar file and select Extract Here.

or open Terminal and give the command tar –xzf <filename>


example:



           $ tar xzf jdk-7u7-linux-i586.tar.gz


3) Move the extracted file to the “/usr/lib/jvm/” folder: [Note: If you don’t find a jvm folder in /usr/lib/ path , create a jvm folder there: $ sudo mkdir –p /usr/lib/jvm/]



           $ sudo mv jdk1.7.0_07 /usr/lib/jvm/


4) Install in your system :



           $ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_07/bin/javac 1


5) That’s it. Test your Java :



           $ java -version 


Remember to replace the file name with the one you have downloaded.






share|improve this answer


























  • oops !!! it doesnt work for me /# sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_11/bin/javac 1 /# java -version The program 'java' can be found in the following packages: * default-jre * gcj-4.6-jre-headless * openjdk-6-jre-headless * gcj-4.5-jre-headless * openjdk-7-jre-headless Try: apt-get install <selected package>

    – Sridhar Ramakrishnan
    Jan 18 '13 at 11:24













  • nothing come...for ex: Empty directory with -ls command means wat would happen likewise printing again that ...this was happened 4th step :(

    – Sridhar Ramakrishnan
    Jan 18 '13 at 11:41











  • ok i will try im having that tar file also ...have to do same once again right??

    – Sridhar Ramakrishnan
    Jan 18 '13 at 11:49











  • actually my main aim is to install eclipse in ubuntu but it is asking me to download java so nly im doing

    – Sridhar Ramakrishnan
    Jan 18 '13 at 11:51











  • Yes. Even I have installed Open JDK for installing Eclipse on my machine, and I have done everything off-line.

    – VRU
    Jan 18 '13 at 11:52











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f244196%2finstallation-problem-on-jdk1-7-0-11%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














As VRU said it is not an error, it is a selection. It appears when more than one version of a program is installed. In this case you can select which Java version is used to execute Java programs.



The top one is the presently selected. Below that all the options are listed. In this case you can choose between the JRE and the JDK. JRE is the Java Runtime Environment and is usually fine for running all Java programs. JDK is the Java Development Kit. It is mainly needed to compile Java programs. Some programming tools require to be run with the JDK instead of JRE. If you are not developing programs in Java, selecting the JRE is fine.



If you had Java 6 (or 5) installed alongside with Java 7, it would also appear in this list.



You can check the version using java --version. The selection can be changed later on with sudo update-java-alternatives. Try forcing this.



If it doesn't work reinstall the java packages. If you are not developing Java you could also remove the JDK entirely, making the selection obsolete.






share|improve this answer


























  • i even tried tat by giving one of those options ,but i couldnt able to see the installed version of java by using the java --version,i am getting The program 'java' can be found in the following packages: * default-jre * gcj-4.6-jre-headless * openjdk-6-jre-headless * gcj-4.5-jre-headless * openjdk-7-jre-headless Try: sudo apt-get install <selected package> so i gave sudo apt-get install with the above packages it shows error as sridhar@sridhar-Satellite-A305:~$ sudo apt-get openjdk-6-jre-headless E: Invalid operation openjdk-6-jre-headless

    – Sridhar Ramakrishnan
    Jan 18 '13 at 6:41
















0














As VRU said it is not an error, it is a selection. It appears when more than one version of a program is installed. In this case you can select which Java version is used to execute Java programs.



The top one is the presently selected. Below that all the options are listed. In this case you can choose between the JRE and the JDK. JRE is the Java Runtime Environment and is usually fine for running all Java programs. JDK is the Java Development Kit. It is mainly needed to compile Java programs. Some programming tools require to be run with the JDK instead of JRE. If you are not developing programs in Java, selecting the JRE is fine.



If you had Java 6 (or 5) installed alongside with Java 7, it would also appear in this list.



You can check the version using java --version. The selection can be changed later on with sudo update-java-alternatives. Try forcing this.



If it doesn't work reinstall the java packages. If you are not developing Java you could also remove the JDK entirely, making the selection obsolete.






share|improve this answer


























  • i even tried tat by giving one of those options ,but i couldnt able to see the installed version of java by using the java --version,i am getting The program 'java' can be found in the following packages: * default-jre * gcj-4.6-jre-headless * openjdk-6-jre-headless * gcj-4.5-jre-headless * openjdk-7-jre-headless Try: sudo apt-get install <selected package> so i gave sudo apt-get install with the above packages it shows error as sridhar@sridhar-Satellite-A305:~$ sudo apt-get openjdk-6-jre-headless E: Invalid operation openjdk-6-jre-headless

    – Sridhar Ramakrishnan
    Jan 18 '13 at 6:41














0












0








0







As VRU said it is not an error, it is a selection. It appears when more than one version of a program is installed. In this case you can select which Java version is used to execute Java programs.



The top one is the presently selected. Below that all the options are listed. In this case you can choose between the JRE and the JDK. JRE is the Java Runtime Environment and is usually fine for running all Java programs. JDK is the Java Development Kit. It is mainly needed to compile Java programs. Some programming tools require to be run with the JDK instead of JRE. If you are not developing programs in Java, selecting the JRE is fine.



If you had Java 6 (or 5) installed alongside with Java 7, it would also appear in this list.



You can check the version using java --version. The selection can be changed later on with sudo update-java-alternatives. Try forcing this.



If it doesn't work reinstall the java packages. If you are not developing Java you could also remove the JDK entirely, making the selection obsolete.






share|improve this answer















As VRU said it is not an error, it is a selection. It appears when more than one version of a program is installed. In this case you can select which Java version is used to execute Java programs.



The top one is the presently selected. Below that all the options are listed. In this case you can choose between the JRE and the JDK. JRE is the Java Runtime Environment and is usually fine for running all Java programs. JDK is the Java Development Kit. It is mainly needed to compile Java programs. Some programming tools require to be run with the JDK instead of JRE. If you are not developing programs in Java, selecting the JRE is fine.



If you had Java 6 (or 5) installed alongside with Java 7, it would also appear in this list.



You can check the version using java --version. The selection can be changed later on with sudo update-java-alternatives. Try forcing this.



If it doesn't work reinstall the java packages. If you are not developing Java you could also remove the JDK entirely, making the selection obsolete.







share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 17 '13 at 12:18

























answered Jan 17 '13 at 12:07









André StannekAndré Stannek

3,3611737




3,3611737













  • i even tried tat by giving one of those options ,but i couldnt able to see the installed version of java by using the java --version,i am getting The program 'java' can be found in the following packages: * default-jre * gcj-4.6-jre-headless * openjdk-6-jre-headless * gcj-4.5-jre-headless * openjdk-7-jre-headless Try: sudo apt-get install <selected package> so i gave sudo apt-get install with the above packages it shows error as sridhar@sridhar-Satellite-A305:~$ sudo apt-get openjdk-6-jre-headless E: Invalid operation openjdk-6-jre-headless

    – Sridhar Ramakrishnan
    Jan 18 '13 at 6:41



















  • i even tried tat by giving one of those options ,but i couldnt able to see the installed version of java by using the java --version,i am getting The program 'java' can be found in the following packages: * default-jre * gcj-4.6-jre-headless * openjdk-6-jre-headless * gcj-4.5-jre-headless * openjdk-7-jre-headless Try: sudo apt-get install <selected package> so i gave sudo apt-get install with the above packages it shows error as sridhar@sridhar-Satellite-A305:~$ sudo apt-get openjdk-6-jre-headless E: Invalid operation openjdk-6-jre-headless

    – Sridhar Ramakrishnan
    Jan 18 '13 at 6:41

















i even tried tat by giving one of those options ,but i couldnt able to see the installed version of java by using the java --version,i am getting The program 'java' can be found in the following packages: * default-jre * gcj-4.6-jre-headless * openjdk-6-jre-headless * gcj-4.5-jre-headless * openjdk-7-jre-headless Try: sudo apt-get install <selected package> so i gave sudo apt-get install with the above packages it shows error as sridhar@sridhar-Satellite-A305:~$ sudo apt-get openjdk-6-jre-headless E: Invalid operation openjdk-6-jre-headless

– Sridhar Ramakrishnan
Jan 18 '13 at 6:41





i even tried tat by giving one of those options ,but i couldnt able to see the installed version of java by using the java --version,i am getting The program 'java' can be found in the following packages: * default-jre * gcj-4.6-jre-headless * openjdk-6-jre-headless * gcj-4.5-jre-headless * openjdk-7-jre-headless Try: sudo apt-get install <selected package> so i gave sudo apt-get install with the above packages it shows error as sridhar@sridhar-Satellite-A305:~$ sudo apt-get openjdk-6-jre-headless E: Invalid operation openjdk-6-jre-headless

– Sridhar Ramakrishnan
Jan 18 '13 at 6:41













0














In my system I have installed OpenJDK in offline mode and it went successful. I am sharing you the same. Before you start, remove all old files so that you don't get in to any confusion and start with any one i.e., either JDK or JRE.



Installation of OpenJDK on Ubuntu :



1) Download OpenJDK



2) Extract the tar file.(using any of the two steps)



      Right click on the .tar file and select Extract Here.

or open Terminal and give the command tar –xzf <filename>


example:



           $ tar xzf jdk-7u7-linux-i586.tar.gz


3) Move the extracted file to the “/usr/lib/jvm/” folder: [Note: If you don’t find a jvm folder in /usr/lib/ path , create a jvm folder there: $ sudo mkdir –p /usr/lib/jvm/]



           $ sudo mv jdk1.7.0_07 /usr/lib/jvm/


4) Install in your system :



           $ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_07/bin/javac 1


5) That’s it. Test your Java :



           $ java -version 


Remember to replace the file name with the one you have downloaded.






share|improve this answer


























  • oops !!! it doesnt work for me /# sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_11/bin/javac 1 /# java -version The program 'java' can be found in the following packages: * default-jre * gcj-4.6-jre-headless * openjdk-6-jre-headless * gcj-4.5-jre-headless * openjdk-7-jre-headless Try: apt-get install <selected package>

    – Sridhar Ramakrishnan
    Jan 18 '13 at 11:24













  • nothing come...for ex: Empty directory with -ls command means wat would happen likewise printing again that ...this was happened 4th step :(

    – Sridhar Ramakrishnan
    Jan 18 '13 at 11:41











  • ok i will try im having that tar file also ...have to do same once again right??

    – Sridhar Ramakrishnan
    Jan 18 '13 at 11:49











  • actually my main aim is to install eclipse in ubuntu but it is asking me to download java so nly im doing

    – Sridhar Ramakrishnan
    Jan 18 '13 at 11:51











  • Yes. Even I have installed Open JDK for installing Eclipse on my machine, and I have done everything off-line.

    – VRU
    Jan 18 '13 at 11:52
















0














In my system I have installed OpenJDK in offline mode and it went successful. I am sharing you the same. Before you start, remove all old files so that you don't get in to any confusion and start with any one i.e., either JDK or JRE.



Installation of OpenJDK on Ubuntu :



1) Download OpenJDK



2) Extract the tar file.(using any of the two steps)



      Right click on the .tar file and select Extract Here.

or open Terminal and give the command tar –xzf <filename>


example:



           $ tar xzf jdk-7u7-linux-i586.tar.gz


3) Move the extracted file to the “/usr/lib/jvm/” folder: [Note: If you don’t find a jvm folder in /usr/lib/ path , create a jvm folder there: $ sudo mkdir –p /usr/lib/jvm/]



           $ sudo mv jdk1.7.0_07 /usr/lib/jvm/


4) Install in your system :



           $ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_07/bin/javac 1


5) That’s it. Test your Java :



           $ java -version 


Remember to replace the file name with the one you have downloaded.






share|improve this answer


























  • oops !!! it doesnt work for me /# sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_11/bin/javac 1 /# java -version The program 'java' can be found in the following packages: * default-jre * gcj-4.6-jre-headless * openjdk-6-jre-headless * gcj-4.5-jre-headless * openjdk-7-jre-headless Try: apt-get install <selected package>

    – Sridhar Ramakrishnan
    Jan 18 '13 at 11:24













  • nothing come...for ex: Empty directory with -ls command means wat would happen likewise printing again that ...this was happened 4th step :(

    – Sridhar Ramakrishnan
    Jan 18 '13 at 11:41











  • ok i will try im having that tar file also ...have to do same once again right??

    – Sridhar Ramakrishnan
    Jan 18 '13 at 11:49











  • actually my main aim is to install eclipse in ubuntu but it is asking me to download java so nly im doing

    – Sridhar Ramakrishnan
    Jan 18 '13 at 11:51











  • Yes. Even I have installed Open JDK for installing Eclipse on my machine, and I have done everything off-line.

    – VRU
    Jan 18 '13 at 11:52














0












0








0







In my system I have installed OpenJDK in offline mode and it went successful. I am sharing you the same. Before you start, remove all old files so that you don't get in to any confusion and start with any one i.e., either JDK or JRE.



Installation of OpenJDK on Ubuntu :



1) Download OpenJDK



2) Extract the tar file.(using any of the two steps)



      Right click on the .tar file and select Extract Here.

or open Terminal and give the command tar –xzf <filename>


example:



           $ tar xzf jdk-7u7-linux-i586.tar.gz


3) Move the extracted file to the “/usr/lib/jvm/” folder: [Note: If you don’t find a jvm folder in /usr/lib/ path , create a jvm folder there: $ sudo mkdir –p /usr/lib/jvm/]



           $ sudo mv jdk1.7.0_07 /usr/lib/jvm/


4) Install in your system :



           $ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_07/bin/javac 1


5) That’s it. Test your Java :



           $ java -version 


Remember to replace the file name with the one you have downloaded.






share|improve this answer















In my system I have installed OpenJDK in offline mode and it went successful. I am sharing you the same. Before you start, remove all old files so that you don't get in to any confusion and start with any one i.e., either JDK or JRE.



Installation of OpenJDK on Ubuntu :



1) Download OpenJDK



2) Extract the tar file.(using any of the two steps)



      Right click on the .tar file and select Extract Here.

or open Terminal and give the command tar –xzf <filename>


example:



           $ tar xzf jdk-7u7-linux-i586.tar.gz


3) Move the extracted file to the “/usr/lib/jvm/” folder: [Note: If you don’t find a jvm folder in /usr/lib/ path , create a jvm folder there: $ sudo mkdir –p /usr/lib/jvm/]



           $ sudo mv jdk1.7.0_07 /usr/lib/jvm/


4) Install in your system :



           $ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_07/bin/javac 1


5) That’s it. Test your Java :



           $ java -version 


Remember to replace the file name with the one you have downloaded.







share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 18 '13 at 9:37

























answered Jan 18 '13 at 9:30









VRUVRU

1,00521632




1,00521632













  • oops !!! it doesnt work for me /# sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_11/bin/javac 1 /# java -version The program 'java' can be found in the following packages: * default-jre * gcj-4.6-jre-headless * openjdk-6-jre-headless * gcj-4.5-jre-headless * openjdk-7-jre-headless Try: apt-get install <selected package>

    – Sridhar Ramakrishnan
    Jan 18 '13 at 11:24













  • nothing come...for ex: Empty directory with -ls command means wat would happen likewise printing again that ...this was happened 4th step :(

    – Sridhar Ramakrishnan
    Jan 18 '13 at 11:41











  • ok i will try im having that tar file also ...have to do same once again right??

    – Sridhar Ramakrishnan
    Jan 18 '13 at 11:49











  • actually my main aim is to install eclipse in ubuntu but it is asking me to download java so nly im doing

    – Sridhar Ramakrishnan
    Jan 18 '13 at 11:51











  • Yes. Even I have installed Open JDK for installing Eclipse on my machine, and I have done everything off-line.

    – VRU
    Jan 18 '13 at 11:52



















  • oops !!! it doesnt work for me /# sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_11/bin/javac 1 /# java -version The program 'java' can be found in the following packages: * default-jre * gcj-4.6-jre-headless * openjdk-6-jre-headless * gcj-4.5-jre-headless * openjdk-7-jre-headless Try: apt-get install <selected package>

    – Sridhar Ramakrishnan
    Jan 18 '13 at 11:24













  • nothing come...for ex: Empty directory with -ls command means wat would happen likewise printing again that ...this was happened 4th step :(

    – Sridhar Ramakrishnan
    Jan 18 '13 at 11:41











  • ok i will try im having that tar file also ...have to do same once again right??

    – Sridhar Ramakrishnan
    Jan 18 '13 at 11:49











  • actually my main aim is to install eclipse in ubuntu but it is asking me to download java so nly im doing

    – Sridhar Ramakrishnan
    Jan 18 '13 at 11:51











  • Yes. Even I have installed Open JDK for installing Eclipse on my machine, and I have done everything off-line.

    – VRU
    Jan 18 '13 at 11:52

















oops !!! it doesnt work for me /# sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_11/bin/javac 1 /# java -version The program 'java' can be found in the following packages: * default-jre * gcj-4.6-jre-headless * openjdk-6-jre-headless * gcj-4.5-jre-headless * openjdk-7-jre-headless Try: apt-get install <selected package>

– Sridhar Ramakrishnan
Jan 18 '13 at 11:24







oops !!! it doesnt work for me /# sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_11/bin/javac 1 /# java -version The program 'java' can be found in the following packages: * default-jre * gcj-4.6-jre-headless * openjdk-6-jre-headless * gcj-4.5-jre-headless * openjdk-7-jre-headless Try: apt-get install <selected package>

– Sridhar Ramakrishnan
Jan 18 '13 at 11:24















nothing come...for ex: Empty directory with -ls command means wat would happen likewise printing again that ...this was happened 4th step :(

– Sridhar Ramakrishnan
Jan 18 '13 at 11:41





nothing come...for ex: Empty directory with -ls command means wat would happen likewise printing again that ...this was happened 4th step :(

– Sridhar Ramakrishnan
Jan 18 '13 at 11:41













ok i will try im having that tar file also ...have to do same once again right??

– Sridhar Ramakrishnan
Jan 18 '13 at 11:49





ok i will try im having that tar file also ...have to do same once again right??

– Sridhar Ramakrishnan
Jan 18 '13 at 11:49













actually my main aim is to install eclipse in ubuntu but it is asking me to download java so nly im doing

– Sridhar Ramakrishnan
Jan 18 '13 at 11:51





actually my main aim is to install eclipse in ubuntu but it is asking me to download java so nly im doing

– Sridhar Ramakrishnan
Jan 18 '13 at 11:51













Yes. Even I have installed Open JDK for installing Eclipse on my machine, and I have done everything off-line.

– VRU
Jan 18 '13 at 11:52





Yes. Even I have installed Open JDK for installing Eclipse on my machine, and I have done everything off-line.

– VRU
Jan 18 '13 at 11:52


















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f244196%2finstallation-problem-on-jdk1-7-0-11%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

GameSpot

connect to host localhost port 22: Connection refused

Getting a Wifi WPA2 wifi connection