Not really. But what you can do is to install Java on one computer and then ZIP the folder where the files were installed. To install on all the other computers, just unzip the archive, set JAVA_HOME and change the PATH variable.
If that's too much work to do manually, you can try to create a custom installer.
Note that this might violate the EULA; if you do this for a company, have legal check this.
Answer from Aaron Digulla on Stack OverflowNot really. But what you can do is to install Java on one computer and then ZIP the folder where the files were installed. To install on all the other computers, just unzip the archive, set JAVA_HOME and change the PATH variable.
If that's too much work to do manually, you can try to create a custom installer.
Note that this might violate the EULA; if you do this for a company, have legal check this.
You can't do this from the command line for Oracle's JDK as you must accept their license agreement on their web site before you can download.
You could download and install the latest OpenJDK using wget and run the installer. (two commands) You would need to change your environment settings which might be possible using a command line regedit, but I always use the windows configuration for this.
How to update my Java from 17 to 22?
how to update java jdk to the latest version in linux terminal?
I installed the latest version of java, but when I type "java --version" on terminal it shows the old one.
Debian Alternatives System - anything similar on Arch?
Videos
Change your PATH variable so that it has the location of the jdk5/bin directory:
- Start -> Control Panel -> System -> Advanced
- Click on Environment Variables, under System Variables, find PATH, and click on it.
- In the Edit windows, modify PATH by adding the location of your jdk5/bin directory to the beginning. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the directory as the value.
- Close the window.
- Reopen Command prompt window, and run
java -version
In the command shell:
set JAVA_HOME=C:\jdk1.6.0u24
set PATH=%JAVA_HOME%\bin;%PATH%
That will temporarily set up the environment in the command shell. Maven, Ant, etc. will pick up on your new version of Java without having to go to the Control Panel repeatedly.
Tools like Eclipse should be able to select which JDK to use in their own configuration tools for use within their environments.
Just as the title says. I have Java 17 on my computer and I want to update to the latest version (which I believe is 22). I went to my Java configure menu and clicked on update but it says that my Java is up to date. So, I'm not sure what I'm doing wrong. If someone can ELI5 this for me, I would be grateful, thank you!
Note: WebUpd8 team's PPA has been discontinued with effective from April 16, 2019. Thus this PPA doesn't have any Java files. More information can be found on PPA's page on Launchpad. Hence this method no longer works and exists because of historical reasons.
Use ppa :
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
if you want java8 :
sudo apt-get install oracle-java8-installer
If you ABSOLUTELY need to have the latest update of java you must manualy install from official source, follow this tuto : http://www.cyberciti.biz/faq/howto-installing-oracle-java7-on-ubuntu-linux/
But I advise you to wait as ppa update
Today (2022/Nov), I just reach it with one command line:
apt install openjdk-17-jdk openjdk-17-jre
how to update java jdk to the latest version in linux terminal? (Im very new to linux)