Glam Prestige Journal

Bright entertainment trends with youth appeal.

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

1

2 Answers

I had the same problem with Windows 10 and it turned out to be due to another program "stealing" the .jar file association.

Johann N. Löfflmann has investigated this problem and has a solution using his program jarfix.exe

see the site:

for his analysis and to download the fix.

1

It should be possible from the system settings (link) and via the assoc (link) and ftype command line commands (link).

E.g. my present settings are:

C:\Users\marc>assoc .jar
.jar=jarfile
C:\Users\marc>ftype jarfile
jarfile="C:\Program Files\Java\jre1.8.0_151\bin\javaw.exe" -jar "%1" %*

It is possible to change those settings via these tools.

7

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy