While trying to run a .jar file (Optifine installer for Minecraft), I accidentally thought that I could use the OpenJDK package that comes with Android Studio to run it. However, I was wrong, and now I can only run .jar files form the command line (Using java -jar from the Oracle Java installation).
I've installed the JDK (Along with the runtime) and tried to set the association for jar files to the Oracle Java installation using Windows Explorer, but it keeps on referencing the (not working) OpenJDK installation.
How can I set the extention for .jar files be set to the Oracle Java installation?
Note: I have Java installed to C:\Program Files\Java\jre-9.0.1
Best Answer
It should be possible from the system settings (link) and via the
assoc
(link) andftype
command line commands (link).E.g. my present settings are:
It is possible to change those settings via these tools.