Jan 11, 2013 How to Update Java Manually. When you install Java on your machine – it will normally install a small program at startup that checks for updates – that program can get disabled – or not do its job – or you might just wish to check for updates manually for peace of mind.
Viewed 801 times
- May 18, 2016 Java, just like Adobe Flash, is often a major security flaw waiting to happen for both Mac and PC owners. Although Apple takes security very seriously and just about forces Mac users with Java to check for Java updates automatically, it’s still never a bad idea to.
- May 20, 2014 In /bin, I had a java soft link that would point to /opt/jdk/current/bin/java. If I wanted to switch JDKs for development, I would just switch the current link. On Mac, I can only download.dmg files that contain installers. If I run more than one, it seems like the latter overwrites the existing install?
I'm a longtime Java developer switching from Ubuntu to Mac: On my Linux development environment, I would untar different jdks to ~/opt/jdk and then setup a current soft link like this:
In
~/bin
, I had a java
soft link that would point to ~/opt/jdk/current/bin/java
If I wanted to switch JDKs for development, I would just switch the
current
link.On Mac, I can only download .dmg files that contain installers. If I run more than one, it seems like the latter overwrites the existing install? Can't I simply download binary archives like on Linux?
clayJava Update Mac Manual Software
clay5,75677 gold badges4747 silver badges102102 bronze badges
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Browse other questions tagged javamacos or ask your own question.
Active8 months ago
I am installing Apache Solr on Linux Debian (Squeeze). I have been instructed to install sun-java jdk 1st. Then am told that I should use the command
sudo update-alternatives --config java
to make sure that a particular java (sun-java) is the default runtime. Yet when I run this command I get:So which number should I select to have sun-java as the default runtime? Also, what exactly do th auto and manual modes mean? If I select 3 above and run the update-alternative command I receive the same output as above, again nothing seems to have changed except that the * is now in front of the 3, though it still reads manual mode.
Is there a way to confirm that what I have done is correct?
Aaron36.9k1010 gold badges8282 silver badges105105 bronze badges
user1680916user1680916
6 Answers
You will notice a big change when selecting options if you type in 'java -version' after doing so. So if you run
Also, with regards to
update-alternatives --config java
and select option 3
, you will be using the Sun implementation.Also, with regards to
auto
vs manual mode
, making a selection should take it out of auto mode
per this page stating:When using the
--config
option, alternatives will list all of the choices for the link group of which given name is the master link. You will then be prompted for which of the choices to use for the link group. Once you make a change, the link group will no longer be in auto mode
. You will need to use the --auto
option in order to return to the automatic state.And I believe
JJDauto mode
is set when you install the first/only JRE/JDK.26.7k3636 gold badges159159 silver badges267267 bronze badges
Jordan DenisonJordan Denison
![Mac Mac](/uploads/1/3/4/4/134476609/795057753.jpg)
update-alternatives
is problematic in this case as it forces you to update all the elements depending on the JDK.Manual store selection checkout mac. For this specific purpose, the package
java-common
contains a tool called update-java-alternatives
. Mac mini model a1283 manual.Apple power mac g4 quicksilver 2002 user manual. It's straightforward to use it. First list the JDK installs available on your machine:
And then pick one up:
jopasseratjopasserat4,76644 gold badges2626 silver badges4646 bronze badges
Assuming one has installed a JDK in
/opt/java/jdk1.8.0_144
then:- Install the alternative for javac
- Check / update the alternatives config:
If there is only a single alternative for
javac
you will get a message saying so, otherwise select the option for the new JDK.Mac Update Java Version
To check everything is setup correctly then:
And finally
Repeat for java, keytool, jar, etc as needed.
Karol Dowbecki30.1k99 gold badges4343 silver badges6262 bronze badges
Richard GrimshawRichard Grimshaw
user2733648user2733648
There are many other binaries that need to be linked so I think it's much better to try something like
sudo update-alternatives --all
and choosing the right alternatives for everything else besides java
and javac
.Update Java Mac Terminal
Paul-Sebastian ManolePaul-Sebastian Manole
Have a look athttps://wiki.debian.org/JavaPackageAt the bottom of this page an other method is descibed using a command from the java-common package
hinnarksenhinnarksen