Skip to main content

Updating Oracle javapath symlinks on Windows

A Java-based application on my Windows 10 machine recently started prompting me to upgrade my version of Java. Since I wanted to control it myself, I declined the app's offer to upgrade for me, and downloaded and installed the latest Java 8 from Oracle. In my case, Java 1.8.0_171, 64-bit version.

The upgrade went fine. But when I launched the app, it again said I needed to upgrade. Why was it still looking at the old location?

I made the change using Settings, to change the JAVA_HOME environment variable to point to the location of the new upgrade. But no change, the app still insisted that I needed to upgrade.

A little research into the app's execution path showed that it was using c:\ProgramData\Oracle\Java\javapath to find Java. When I looked in that folder, I found symbolic links to my old Java installation.

Normally, this hidden bit of information gets updated automatically in the upgrade or installation process. I have read of cases where, when downgrading to an older version, these symlinks do not get updates. See here and here.

But in my case it was an upgrade. Possibly it was the change from 32-bit to 64-bit Java.

Whatever the reason that these links were not changed, here is how to change them:
1. Launch a command-shell as Administrator;
2. Navigate to the folder c:\ProgramData\Oracle\Java\javapath
3. Remove the existing symbolic links with 
del java*.exe

4. Recreate each of the links, pointing to your own Java installation.
mklink java.exe "C:\[your_install_path_here]\bin\java.exe"
mklink javaw.exe "C:\[your_install_path_here]\bin\javaw.exe"
mklink javaws.exe "C:\[your_install_path_here]\bin\javaws.exe"


Popular posts from this blog

Trigger Windows Scheduled Task from Remote Computer via Jenkins

One thing I love about working in Information Technology is the opportunity - the NEED - to constantly learn new things. If a week goes by in which I have not looked up something on StackOverflow or other message boards, I start lobbying my team for more challenges.

This week, I learned the power of running "SCHTASKS.exe" from a command-line script for a remote server in a Microsoft Windows environment.

If you don't know Schtasks, you can read up on it here:

In a nutshell, it is the command-line interface for the Windows Task Scheduler, and allows you (or a system administrator) to create, change, run, query, terminate, and delete scheduled tasks on a work-station, either the local one or a remote one.

Not all of the features are available in older versions. In my scenario below, this was relevant as the local computer will be a Windows 8 machine, and the remote server is, shall we say, a muc…

Adding Items to a ListView using Scala, ScalaFX and FXML

I have been playing with writing an application using Scala, with its API defined in ScalaFX, which wraps the powerful JavaFX library. For simple exercises, coding the UI by hand was enough. But for more complex forms, I began using the JavaFX Scene Builder tool.

Fortunately, others have blazed this trail, and there are fairly stable ScalaFX and ScalaFXML libraries available.

Using the Scene Builder tool, I laid out my form and included a ListBox to hold possible gender selections.

The Scene Builder tool generated fxml code such as:
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="208.0" prefWidth="275.0" xmlns="" xmlns:fx="">
      <Label layoutX="14.0" layoutY="30.0" text="Name" />
      <Label layoutX="14.0" layoutY="71…

How to do Git Rebase in Eclipse

This is an abbreviated version of a fuller post about Git Rebase in Eclipse. See the longer one here:
One side-effect of merging Git branches is that it leaves a Merge commit. This can create a history view something like:
The clutter of parallel lines shows the life spans of those local branches, and extra commits (nine in the above screen-shot, marked by the green arrows icon).
Check out this extreme-case history:
Merge Commits show all the gory details of how the code base evolved. For some teams, that’s what they want or need, all the time.

Others may find it unnecessarily long and cluttered. They prefer the history to tell the bigger story, and not dwell on tiny details like every trivial Merge-commit.

Git Rebase offers us 2 benefits over Git Merge: First, Rebase allows us to clean up a set of local commits before pushing them to the shared, central repository. For this, the Eclipse EGit Rebase Interact…