Apt-get install java 1.6


















Click the. Select the checkbox to accept the license agreement and press the Download button. Your download will begin. You may need to log in to your Oracle account one more time before the download starts. On your local machine, upload the file to your server. On macOS, Linux, or Windows using the Windows Subsystem for Linux , use the scp command to transfer the file to the home directory of your sammy user.

Install the software-properties-common package, which adds the add-apt-repository command to your system:. Then use the add-apt-repository command to add the repo to your list of package sources:. You may see a message about no valid OpenPGP data found , but you can safely ignore this.

Create this directory and move the Oracle JDK archive there:. The installer will first ask you to accept the Oracle license agreement. Accept the agreement, then the installer will extract the Java package and install it. You can have multiple Java installations on one server. You can configure which version is the default for use on the command line by using the update-alternatives command.

Choose the number associated with the Java version to use it as the default, or press ENTER to leave the current settings in place. Other commands for which this command can be run include, but are not limited to: keytool , javadoc and jarsigner. Improve this question. Oleg Mikheev Don't know where this should be migrated or if it should that said If you are merely wanting to compile code compatible for version 1.

Whether he already has Java installed or not does not change the fact that you do not need to be root to install Java on Linux and that you can install as many different Java versions you want on Linux. OP doesn't want to "Use apt-get to install Java 1. What he wants is to install 1. Add a comment. Active Oldest Votes. Changing your Java version can be as simple as this All this from the same user account. So it's not as if you had to install "one" Java version on a Linux system Improve this answer.

Shantha Kumara 2, 3 3 gold badges 34 34 silver badges 49 49 bronze badges. TacticalCoder TacticalCoder 6, 3 3 gold badges 27 27 silver badges 37 37 bronze badges. Didn't know that! Any chance this can be done on windows too just by changing the path? Or can it be 'hacked up' on windows? So this is quite different from Linux where you can simply install Java with non-root accounts.

I mean, seen that on Linux you can install Java without being root you can be sure that you can install as many different Java as you want.

On the Windows side of the pond I've got no clue ; — TacticalCoder. Community Bot 1 1 1 silver badge. Alejandro Zurcher Alejandro Zurcher 3 3 silver badges 12 12 bronze badges. Harshit Chaurasia Harshit Chaurasia 2 2 silver badges 7 7 bronze badges.

You have now installed Java and know how to manage different versions of it. Where would you like to share this to? Twitter Reddit Hacker News Facebook. Share link Tutorial share link. Sign Up. DigitalOcean home. Community Control Panel. Hacktoberfest Contribute to Open Source. By Koen Vlaswinkel Published on April 23, This article uses Ubuntu Ubuntu Prerequisites To follow this tutorial, you will need: One Ubuntu First, update the package index.

You can do so using the following command: sudo apt-get install oracle-java8-installer Oracle JDK 9 This is a developer preview and the general release is scheduled for March To install JDK 9, use the following command: sudo apt-get install oracle-java9-installer Managing Java There can be multiple Java installations on one server. About the authors.



0コメント

  • 1000 / 1000